This patch changes the "usb storage" command to return success if it
finds a USB storage device, otherwise it returns error.
Signed-off-by: Markus Klotzbuecher <mk@denx.de>
        }
 
        if (strncmp(argv[1], "stor", 4) == 0) {
-               usb_stor_info();
-               return 0;
+               return usb_stor_info();
        }
 
        if (strncmp(argv[1],"part",4) == 0) {
 
  * show info on storage devices; 'usb start/init' must be invoked earlier
  * as we only retrieve structures populated during devices initialization
  */
-void usb_stor_info(void)
+int usb_stor_info(void)
 {
        int i;
 
-       if (usb_max_devs > 0)
+       if (usb_max_devs > 0) {
                for (i = 0; i < usb_max_devs; i++) {
                        printf ("  Device %d: ", i);
                        dev_print(&usb_dev_desc[i]);
+                       return 0;
                }
-       else
+       } else {
                printf("No storage devices, perhaps not 'usb start'ed..?\n");
+               return 1;
+       }
 }
 
 /*********************************************************************************