From 841e5edd1623f3fecb6bffc5c2f938ed7a947360 Mon Sep 17 00:00:00 2001 From: Anatolij Gustschin Date: Wed, 26 Mar 2008 17:47:44 +0100 Subject: [PATCH 1/2] Fix compilation error in cmd_usb.c This patch fixes compilation error cmd_usb.c: In function 'do_usb': cmd_usb.c:552: error: void value not ignored as it ought to be Signed-off-by: Anatolij Gustschin Signed-off-by: Markus Klotzbuecher --- include/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/usb.h b/include/usb.h index 4e1539fa88..5a6ffddec8 100644 --- a/include/usb.h +++ b/include/usb.h @@ -195,7 +195,7 @@ void usb_event_poll(void); #define USB_MAX_STOR_DEV 5 block_dev_desc_t *usb_stor_get_dev(int index); int usb_stor_scan(int mode); -void usb_stor_info(void); +int usb_stor_info(void); #endif From b9e749e95354f33eb5dc6653c6db7d502adb95fe Mon Sep 17 00:00:00 2001 From: Markus Klotzbuecher Date: Wed, 26 Mar 2008 18:26:43 +0100 Subject: [PATCH 2/2] USB, Storage: fix a bug introduced in commit f6b44e0e4d18fe507833a0f76d24a9aa72c123f1 that will cause usb_stor_info to only print only information on one storage device, but not for multiple. Signed-off-by: Markus Klotzbuecher --- common/usb_storage.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/usb_storage.c b/common/usb_storage.c index 81d2f92100..d263b6c0d0 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; } /*********************************************************************************