diff options
author | Simon Glass <sjg@chromium.org> | 2019-12-28 10:44:44 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-01-17 13:26:49 -0500 |
commit | 1444998230824ac9e95c14073a00e99e59b78ed8 (patch) | |
tree | 781cd49bf140e2c2ddd0bcbb30113c547d87cbbf | |
parent | 77f4e477ae85e7ad229a86337a2b951aa7b48e68 (diff) | |
download | u-boot-1444998230824ac9e95c14073a00e99e59b78ed8.tar.gz |
common: Move functions for loading from fat/ext2 to fs.h
These are filesystem functions and belong in the filesystem header file.
Move them.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | board/inversepath/usbarmory/usbarmory.c | 1 | ||||
-rw-r--r-- | cmd/fat.c | 2 | ||||
-rw-r--r-- | cmd/pxe.c | 1 | ||||
-rw-r--r-- | include/common.h | 6 | ||||
-rw-r--r-- | include/fs.h | 22 |
5 files changed, 25 insertions, 7 deletions
diff --git a/board/inversepath/usbarmory/usbarmory.c b/board/inversepath/usbarmory/usbarmory.c index 19510184d8..e9eea40e45 100644 --- a/board/inversepath/usbarmory/usbarmory.c +++ b/board/inversepath/usbarmory/usbarmory.c @@ -9,6 +9,7 @@ #include <common.h> #include <command.h> +#include <fs.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> @@ -31,7 +31,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(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return do_load(cmdtp, flag, argc, argv, FS_TYPE_FAT); } @@ -6,6 +6,7 @@ #include <common.h> #include <command.h> +#include <fs.h> #include <net.h> #include "pxe_utils.h" diff --git a/include/common.h b/include/common.h index 7e2de23ae4..34ef346400 100644 --- a/include/common.h +++ b/include/common.h @@ -80,12 +80,6 @@ extern ulong load_addr; /* Default Load Address */ extern ulong save_addr; /* Default Save Address */ extern ulong save_size; /* Default Save Size */ -/* common/cmd_fat.c */ -int do_fat_fsload(cmd_tbl_t *, int, int, char * const []); - -/* common/cmd_ext2.c */ -int do_ext2load(cmd_tbl_t *, int, int, char * const []); - /* common/exports.c */ void jumptable_init(void); diff --git a/include/fs.h b/include/fs.h index 742a535b5f..37e35c2120 100644 --- a/include/fs.h +++ b/include/fs.h @@ -14,6 +14,28 @@ #define FS_TYPE_UBIFS 4 #define FS_TYPE_BTRFS 5 +/** + * do_fat_fsload - Run the fatload command + * + * @cmdtp: Command information for fatload + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * @return result (see enum command_ret_t) + */ +int do_fat_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); + +/** + * do_ext2load - Run the ext2load command + * + * @cmdtp: Command information for ext2load + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * @return result (see enum command_ret_t) + */ +int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); + /* * Tell the fs layer which block device an partition to use for future * commands. This also internally identifies the filesystem that is present |