aboutsummaryrefslogtreecommitdiff
path: root/cmd/bootm.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-05-10 11:40:03 -0600
committerTom Rini <trini@konsulko.com>2020-05-18 18:36:55 -0400
commit09140113108541b95d340f3c7b6ee597d31ccc73 (patch)
tree4b4241b799bbbb2eeef4164392442b193af1703f /cmd/bootm.c
parent691d719db7183dfb1d1360efed4c5e9f6899095f (diff)
downloadu-boot-09140113108541b95d340f3c7b6ee597d31ccc73.zip
u-boot-09140113108541b95d340f3c7b6ee597d31ccc73.tar.gz
u-boot-09140113108541b95d340f3c7b6ee597d31ccc73.tar.bz2
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>
Diffstat (limited to 'cmd/bootm.c')
-rw-r--r--cmd/bootm.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/cmd/bootm.c b/cmd/bootm.c
index 931d53f..d5f877c 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -34,12 +34,13 @@ extern flash_info_t flash_info[]; /* info for FLASH chips */
#endif
#if defined(CONFIG_CMD_IMLS) || defined(CONFIG_CMD_IMLS_NAND)
-static int do_imls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+static int do_imls(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
#endif
/* we overload the cmd field with our state machine info instead of a
* function pointer */
-static cmd_tbl_t cmd_bootm_sub[] = {
+static struct cmd_tbl cmd_bootm_sub[] = {
U_BOOT_CMD_MKENT(start, 0, 1, (void *)BOOTM_STATE_START, "", ""),
U_BOOT_CMD_MKENT(loados, 0, 1, (void *)BOOTM_STATE_LOADOS, "", ""),
#ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH
@@ -55,12 +56,12 @@ static cmd_tbl_t cmd_bootm_sub[] = {
U_BOOT_CMD_MKENT(go, 0, 1, (void *)BOOTM_STATE_OS_GO, "", ""),
};
-static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_bootm_subcommand(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret = 0;
long state;
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
c = find_cmd_tbl(argv[0], &cmd_bootm_sub[0], ARRAY_SIZE(cmd_bootm_sub));
argc--; argv++;
@@ -89,7 +90,7 @@ static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc,
/* bootm - boot application image from image in memory */
/*******************************************************************/
-int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
#ifdef CONFIG_NEEDS_MANUAL_RELOC
static int relocated = 0;
@@ -136,7 +137,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
BOOTM_STATE_OS_GO, &images, 1);
}
-int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd)
+int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd)
{
const char *ep = env_get("autostart");
@@ -201,7 +202,7 @@ U_BOOT_CMD(
/* bootd - boot default image */
/*******************************************************************/
#if defined(CONFIG_CMD_BOOTD)
-int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bootd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
return run_command(env_get("bootcmd"), flag);
}
@@ -226,7 +227,8 @@ U_BOOT_CMD(
/* iminfo - print header info for a requested image */
/*******************************************************************/
#if defined(CONFIG_CMD_IMI)
-static int do_iminfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_iminfo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int arg;
ulong addr;
@@ -519,7 +521,8 @@ static int do_imls_nand(void)
#endif
#if defined(CONFIG_CMD_IMLS) || defined(CONFIG_CMD_IMLS_NAND)
-static int do_imls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_imls(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret_nor = 0, ret_nand = 0;