Aras Vaichas <[EMAIL PROTECTED]> writes:

> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email 
> ______________________________________________________________________--- 
> a/include/usb.h     2008-03-19 13:47:18.000000000 +1100

Its my fault for not paying attention correctly, but this line
essentially broke git-am so that this chunk didn't get applied
correctly.

> -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;
>               }

Returning here will result in only the first of all storage devices to
be printed.

> -     else
> +     } else {
>               printf("No storage devices, perhaps not 'usb start'ed..?\n");
> +             return 1;
> +     }
>  }
>  
>  
> /*********************************************************************************

I committed the following patch to fix this

diff --git a/common/usb_storage.c b/common/usb_storage.c
index 81d2f92..d263b6c 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -196,12 +196,12 @@ int usb_stor_info(void)
                for (i = 0; i < usb_max_devs; i++) {
                        printf ("  Device %d: ", i);
                        dev_print(&usb_dev_desc[i]);
-                       return 0;
                }
-       } else {
-               printf("No storage devices, perhaps not 'usb start'ed..?\n");
-               return 1;
+               return 0;
        }
+       
+       printf("No storage devices, perhaps not 'usb start'ed..?\n");
+       return 1;
 }
 
 
/*********************************************************************************


Best regards

     Markus

--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: [EMAIL PROTECTED]



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to