]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/usb_storage.c
USB Storage, add meaningful return value
[people/ms/u-boot.git] / common / usb_storage.c
index 443d78574abcef38671e7453f001b490ac62c56b..81d2f92100eb54686f9a3f030ca7f851b4ff8fc5 100644 (file)
@@ -188,17 +188,20 @@ void usb_show_progress(void)
  * 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;
+       }
 }
 
 /*********************************************************************************