From e6f6f9e64882ddf242437c73fdd9ff06a8eb7c21 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:39:58 -0600 Subject: common: Drop part.h from common header Move this uncommon header out of the common header. Signed-off-by: Simon Glass --- include/fs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/fs.h') diff --git a/include/fs.h b/include/fs.h index 37e35c2120..9fdb4a3424 100644 --- a/include/fs.h +++ b/include/fs.h @@ -14,6 +14,8 @@ #define FS_TYPE_UBIFS 4 #define FS_TYPE_BTRFS 5 +struct blk_desc; + /** * do_fat_fsload - Run the fatload command * -- cgit From 09140113108541b95d340f3c7b6ee597d31ccc73 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:03 -0600 Subject: command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass --- include/fs.h | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'include/fs.h') diff --git a/include/fs.h b/include/fs.h index 9fdb4a3424..29f737b8c2 100644 --- a/include/fs.h +++ b/include/fs.h @@ -7,6 +7,8 @@ #include +struct cmd_tbl; + #define FS_TYPE_ANY 0 #define FS_TYPE_FAT 1 #define FS_TYPE_EXT 2 @@ -25,7 +27,8 @@ struct blk_desc; * @argv: List of arguments * @return result (see enum command_ret_t) */ -int do_fat_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); +int do_fat_fsload(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]); /** * do_ext2load - Run the ext2load command @@ -36,7 +39,7 @@ int do_fat_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); * @argv: List of arguments * @return result (see enum command_ret_t) */ -int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); +int do_ext2load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); /* * Tell the fs layer which block device an partition to use for future @@ -226,34 +229,34 @@ int fs_mkdir(const char *filename); * Common implementation for various filesystem commands, optionally limited * to a specific filesystem type via the fstype parameter. */ -int do_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], - int fstype); -int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], - int fstype); -int do_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], - int fstype); +int do_size(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], + int fstype); +int do_load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], + int fstype); +int do_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], + int fstype); int file_exists(const char *dev_type, const char *dev_part, const char *file, int fstype); -int do_save(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], - int fstype); -int do_rm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], - int fstype); -int do_mkdir(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], - int fstype); -int do_ln(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], +int do_save(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], + int fstype); +int do_rm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], + int fstype); +int do_mkdir(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], + int fstype); +int do_ln(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], int fstype); /* * Determine the UUID of the specified filesystem and print it. Optionally it is * possible to store the UUID directly in env. */ -int do_fs_uuid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], - int fstype); +int do_fs_uuid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], + int fstype); /* * Determine the type of the specified filesystem and print it. Optionally it is * possible to store the type directly in env. */ -int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); +int do_fs_type(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); #endif /* _FS_H */ -- cgit