Add command for handling DDR ECC registers on MPC8349EE MDS board.
[oweals/u-boot.git] / common / cmd_ext2.c
index f8e04ed8283aec766aef95906df6cf928d4411c0..5db42f2b0d65e79e9d3b546b1864abb4ba26799a 100644 (file)
@@ -41,6 +41,9 @@
 #include <linux/ctype.h>
 #include <asm/byteorder.h>
 #include <ext2fs.h>
+#if ((CONFIG_COMMANDS & CFG_CMD_USB) && defined(CONFIG_USB_STORAGE))
+#include <usb.h>
+#endif
 
 #ifndef CONFIG_DOS_PARTITION
 #error DOS partition support must be selected
@@ -149,7 +152,7 @@ int do_ext2ls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
 U_BOOT_CMD(
        ext2ls, 4,      1,      do_ext2ls,
-       "ext2ls- list files in a directory (default /)\n",
+       "ext2ls  - list files in a directory (default /)\n",
        "<interface> <dev[:part]> [directory]\n"
        "    - list files from 'dev' on 'interface' in a 'directory'\n"
 );
@@ -161,7 +164,7 @@ int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
        char *filename = NULL;
        char *ep;
-       int dev, part = 0;
+       int dev, part = 1;
        ulong addr = 0, part_length, filelen;
        disk_partition_t info;
        block_dev_desc_t *dev_desc = NULL;
@@ -223,12 +226,12 @@ int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        PRINTF("Using device %s%d, partition %d\n", argv[1], dev, part);
 
        if (part != 0) {
-               if (get_partition_info (&dev_desc[dev], part, &info)) {
+               if (get_partition_info (dev_desc, part, &info)) {
                        printf ("** Bad partition %d **\n", part);
                        return(1);
                }
 
-               if (strncmp(info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) {
+               if (strncmp((char *)info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) {
                        printf ("\n** Invalid partition type \"%.32s\""
                                " (expect \"" BOOT_PART_TYPE "\")\n",
                                info.type);