diff options
author | Simon Glass <sjg@chromium.org> | 2020-05-10 20:40:03 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-05-19 01:36:55 +0300 |
commit | 09140113108541b95d340f3c7b6ee597d31ccc73 (patch) | |
tree | 4b4241b799bbbb2eeef4164392442b193af1703f /cmd/pxe.c | |
parent | 691d719db7183dfb1d1360efed4c5e9f6899095f (diff) | |
download | u-boot-09140113108541b95d340f3c7b6ee597d31ccc73.tar.xz |
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/pxe.c')
-rw-r--r-- | cmd/pxe.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -24,7 +24,8 @@ const char *pxe_default_paths[] = { NULL }; -static int do_get_tftp(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr) +static int do_get_tftp(struct cmd_tbl *cmdtp, const char *file_path, + char *file_addr) { char *tftp_argv[] = {"tftp", NULL, NULL, NULL}; @@ -42,7 +43,7 @@ static int do_get_tftp(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr) * * Returns 1 on success or < 0 on error. */ -static int pxe_uuid_path(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r) +static int pxe_uuid_path(struct cmd_tbl *cmdtp, unsigned long pxefile_addr_r) { char *uuid_str; @@ -60,7 +61,7 @@ static int pxe_uuid_path(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r) * * Returns 1 on success or < 0 on error. */ -static int pxe_mac_path(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r) +static int pxe_mac_path(struct cmd_tbl *cmdtp, unsigned long pxefile_addr_r) { char mac_str[21]; int err; @@ -80,7 +81,7 @@ static int pxe_mac_path(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r) * * Returns 1 on success or < 0 on error. */ -static int pxe_ipaddr_paths(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r) +static int pxe_ipaddr_paths(struct cmd_tbl *cmdtp, unsigned long pxefile_addr_r) { char ip_addr[9]; int mask_pos, err; @@ -113,7 +114,7 @@ static int pxe_ipaddr_paths(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r) * Returns 0 on success or 1 on error. */ static int -do_pxe_get(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +do_pxe_get(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { char *pxefile_addr_str; unsigned long pxefile_addr_r; @@ -166,7 +167,7 @@ do_pxe_get(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) * Returns 0 on success, 1 on error. */ static int -do_pxe_boot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +do_pxe_boot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { unsigned long pxefile_addr_r; struct pxe_menu *cfg; @@ -206,14 +207,14 @@ do_pxe_boot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } -static cmd_tbl_t cmd_pxe_sub[] = { +static struct cmd_tbl cmd_pxe_sub[] = { U_BOOT_CMD_MKENT(get, 1, 1, do_pxe_get, "", ""), U_BOOT_CMD_MKENT(boot, 2, 1, do_pxe_boot, "", "") }; -static int do_pxe(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_pxe(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - cmd_tbl_t *cp; + struct cmd_tbl *cp; if (argc < 2) return CMD_RET_USAGE; |