]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_ext4.c
common: remove unaligned access error in bootmenu_getoption()
[karo-tx-uboot.git] / common / cmd_ext4.c
index e193f29c4726c992f59efdd08a190146464e50bc..706fd54a553b9fc394a18c3f4add6027838967c0 100644 (file)
@@ -59,7 +59,7 @@
 int do_ext4_load(cmd_tbl_t *cmdtp, int flag, int argc,
                                                char *const argv[])
 {
-       return do_fsload(cmdtp, flag, argc, argv, FS_TYPE_EXT);
+       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[])
@@ -88,10 +88,10 @@ int do_ext4_write(cmd_tbl_t *cmdtp, int flag, int argc,
        dev = dev_desc->dev;
 
        /* get the filename */
-       filename = argv[3];
+       filename = argv[4];
 
        /* get the address in hexadecimal format (string to int) */
-       ram_address = simple_strtoul(argv[4], NULL, 16);
+       ram_address = simple_strtoul(argv[3], NULL, 16);
 
        /* get the filesize in base 10 format */
        file_size = simple_strtoul(argv[5], NULL, 10);
@@ -122,18 +122,19 @@ 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");
+       "<interface> <dev[:part]> <addr> <absolute filename path> [sizebytes]\n"
+       "    - 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.");