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 --- fs/fs.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'fs/fs.c') diff --git a/fs/fs.c b/fs/fs.c index 061917a9847..5591c65eaa9 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -3,6 +3,7 @@ * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. */ +#include #include #include #include @@ -644,8 +645,8 @@ int fs_ln(const char *fname, const char *target) return ret; } -int do_size(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) { loff_t size; @@ -663,8 +664,8 @@ int do_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], return 0; } -int do_load(cmd_tbl_t *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) { unsigned long addr; const char *addr_str; @@ -737,8 +738,8 @@ int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], return 0; } -int do_ls(cmd_tbl_t *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) { if (argc < 2) return CMD_RET_USAGE; @@ -763,8 +764,8 @@ int file_exists(const char *dev_type, const char *dev_part, const char *file, return fs_exists(file); } -int do_save(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], - int fstype) +int do_save(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], + int fstype) { unsigned long addr; const char *filename; @@ -805,8 +806,8 @@ int do_save(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], return 0; } -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) { int ret; char uuid[37]; @@ -830,7 +831,7 @@ int do_fs_uuid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], return CMD_RET_SUCCESS; } -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[]) { struct fstype_info *info; @@ -852,7 +853,7 @@ int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_SUCCESS; } -int do_rm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], +int do_rm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], int fstype) { if (argc != 4) @@ -867,7 +868,7 @@ int do_rm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], return 0; } -int do_mkdir(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], +int do_mkdir(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], int fstype) { int ret; @@ -887,7 +888,7 @@ int do_mkdir(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], return 0; } -int do_ln(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], +int do_ln(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], int fstype) { if (argc != 5) -- cgit v1.2.3