From 045fa1e1142552799ad3203e9e0bc22a11e866ea Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Mon, 22 Oct 2012 06:43:51 +0000 Subject: fs: add filesystem switch libary, implement ls and fsload commands Implement "ls" and "fsload" commands that act like {fat,ext2}{ls,load}, and transparently handle either file-system. This scheme could easily be extended to other filesystem types; I only didn't do it for zfs because I don't have any filesystems of that type to test with. Replace the implementation of {fat,ext[24]}{ls,load} with this new code too. Signed-off-by: Stephen Warren --- common/cmd_ext4.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'common/cmd_ext4.c') diff --git a/common/cmd_ext4.c b/common/cmd_ext4.c index ca4656184c..237bc198ae 100644 --- a/common/cmd_ext4.c +++ b/common/cmd_ext4.c @@ -47,10 +47,10 @@ #include #include #include -#include #include #include #include +#include #if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE) #include @@ -59,18 +59,12 @@ int do_ext4_load(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { - if (do_ext_load(cmdtp, flag, argc, argv)) - return -1; - - return 0; + return do_fsload(cmdtp, flag, argc, argv, FS_TYPE_EXT); } int do_ext4_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { - if (do_ext_ls(cmdtp, flag, argc, argv)) - return -1; - - return 0; + return do_ls(cmdtp, flag, argc, argv, FS_TYPE_EXT); } #if defined(CONFIG_CMD_EXT4_WRITE) -- cgit