]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_fat.c
* Add automatic update support for LWMON board
[karo-tx-uboot.git] / common / cmd_fat.c
index c5b3f06fe8a4f2d575d3e3b6f050c7536ccfabb9..6844c103f22290fa70f6fe46a3397684bbf5e07a 100644 (file)
@@ -37,8 +37,6 @@
 #include <fat.h>
 
 
-
-
 block_dev_desc_t *get_dev (char* ifname, int dev)
 {
 #if (CONFIG_COMMANDS & CFG_CMD_IDE)
@@ -64,6 +62,12 @@ block_dev_desc_t *get_dev (char* ifname, int dev)
                extern block_dev_desc_t *  mmc_get_dev(int dev);
                return(mmc_get_dev(dev));
        }
+#endif
+#if defined(CONFIG_SYSTEMACE)
+       if (strcmp(ifname,"ace")==0) {
+               extern block_dev_desc_t *  systemace_get_dev(int dev);
+               return(systemace_get_dev(dev));
+       }
 #endif
        return NULL;
 }
@@ -82,7 +86,7 @@ int do_fat_fsload (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
        if (argc < 5) {
                printf ("usage: fatload <interface> <dev[:part]> <addr> <filename> [bytes]\n");
-               return (0);
+               return 1;
        }
        dev = (int)simple_strtoul (argv[2], &ep, 16);
        dev_desc=get_dev(argv[1],dev);
@@ -110,17 +114,16 @@ int do_fat_fsload (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
        if(size==-1) {
                printf("\n** Unable to read \"%s\" from %s %d:%d **\n",argv[4],argv[1],dev,part);
-       } else {
-               printf ("\n%ld bytes read\n", size);
-
-               sprintf(buf, "%lX", size);
-               setenv("filesize", buf);
+               return 1;
        }
 
-       return size;
-}
+       printf ("\n%ld bytes read\n", size);
 
+       sprintf(buf, "%lX", size);
+       setenv("filesize", buf);
 
+       return 0;
+}
 
 
 U_BOOT_CMD(