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>
This commit is contained in:
Simon Glass
2020-05-10 11:40:03 -06:00
committed by Tom Rini
parent 691d719db7
commit 0914011310
465 changed files with 1987 additions and 1527 deletions

View File

@@ -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 @@ U_BOOT_CMD(
" 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 @@ U_BOOT_CMD(
" 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 @@ U_BOOT_CMD(
" - 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 @@ U_BOOT_CMD(
);
#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 @@ U_BOOT_CMD(
" 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 @@ U_BOOT_CMD(
" - 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);
}