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 <sjg@chromium.org>
diff --git a/cmd/fat.c b/cmd/fat.c
index a063a62..b438ce1 100644
--- a/cmd/fat.c
+++ b/cmd/fat.c
@@ -8,13 +8,14 @@
* Boot support
*/
#include <common.h>
+#include <command.h>
#include <mapmem.h>
#include <fat.h>
#include <fs.h>
#include <part.h>
#include <asm/cache.h>
-int do_fat_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_fat_size(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
return do_size(cmdtp, flag, argc, argv, FS_TYPE_FAT);
}
@@ -27,7 +28,7 @@
" and determine its size."
);
-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[])
{
return do_load(cmdtp, flag, argc, argv, FS_TYPE_FAT);
}
@@ -48,7 +49,8 @@
" be printed and performance will suffer for the load."
);
-static int do_fat_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fat_ls(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_ls(cmdtp, flag, argc, argv, FS_TYPE_FAT);
}
@@ -60,8 +62,8 @@
" - list files from 'dev' on 'interface' in a 'directory'"
);
-static int do_fat_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_fat_fsinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int dev, part;
struct blk_desc *dev_desc;
@@ -93,8 +95,8 @@
);
#ifdef CONFIG_FAT_WRITE
-static int do_fat_fswrite(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_fat_fswrite(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
loff_t size;
int ret;
@@ -148,7 +150,8 @@
" to 'dev' on 'interface'"
);
-static int do_fat_rm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fat_rm(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_rm(cmdtp, flag, argc, argv, FS_TYPE_FAT);
}
@@ -160,8 +163,8 @@
" - delete a file from 'dev' on 'interface'"
);
-static int do_fat_mkdir(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_fat_mkdir(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_mkdir(cmdtp, flag, argc, argv, FS_TYPE_FAT);
}