diff options
author | Simon Glass <sjg@chromium.org> | 2020-05-10 11:40:03 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-05-18 18:36:55 -0400 |
commit | 09140113108541b95d340f3c7b6ee597d31ccc73 (patch) | |
tree | 4b4241b799bbbb2eeef4164392442b193af1703f /fs | |
parent | 691d719db7183dfb1d1360efed4c5e9f6899095f (diff) |
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 'fs')
-rw-r--r-- | fs/fs.c | 29 |
1 files changed, 15 insertions, 14 deletions
@@ -3,6 +3,7 @@ * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. */ +#include <command.h> #include <config.h> #include <errno.h> #include <common.h> @@ -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) |