summaryrefslogtreecommitdiffstats
path: root/common/cmd_ext4.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cmd_ext4.c')
-rw-r--r--common/cmd_ext4.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/common/cmd_ext4.c b/common/cmd_ext4.c
index ca4656184c..dcf76a50cd 100644
--- a/common/cmd_ext4.c
+++ b/common/cmd_ext4.c
@@ -47,10 +47,10 @@
#include <image.h>
#include <linux/ctype.h>
#include <asm/byteorder.h>
-#include <ext_common.h>
#include <ext4fs.h>
#include <linux/stat.h>
#include <malloc.h>
+#include <fs.h>
#if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE)
#include <usb.h>
@@ -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_load(cmdtp, flag, argc, argv, FS_TYPE_EXT, 16);
}
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)
@@ -107,7 +101,7 @@ int do_ext4_write(cmd_tbl_t *cmdtp, int flag, int argc,
/* mount the filesystem */
if (!ext4fs_mount(info.size)) {
- printf("Bad ext4 partition %s %d:%lu\n", argv[1], dev, part);
+ printf("Bad ext4 partition %s %d:%d\n", argv[1], dev, part);
goto fail;
}
@@ -129,17 +123,18 @@ fail:
U_BOOT_CMD(ext4write, 6, 1, do_ext4_write,
"create a file in the root directory",
"<interface> <dev[:part]> [Absolute filename path] [Address] [sizebytes]\n"
- " - create a file in / directory");
+ " - create a file in / directory");
#endif
U_BOOT_CMD(ext4ls, 4, 1, do_ext4_ls,
"list files in a directory (default /)",
"<interface> <dev[:part]> [directory]\n"
- " - list files from 'dev' on 'interface' in a 'directory'");
+ " - list files from 'dev' on 'interface' in a 'directory'");
U_BOOT_CMD(ext4load, 6, 0, do_ext4_load,
"load binary file from a Ext4 filesystem",
"<interface> <dev[:part]> [addr] [filename] [bytes]\n"
- " - load binary file 'filename' from 'dev' on 'interface'\n"
- " to address 'addr' from ext4 filesystem");
+ " - load binary file 'filename' from 'dev' on 'interface'\n"
+ " to address 'addr' from ext4 filesystem.\n"
+ " All numeric parameters are assumed to be hex.");
OpenPOWER on IntegriCloud