[U-Boot] Fix dev_print for when it is called from usb_stor_info (usb storage command)

Nícolas Carneiro Lebedenco nicolas.lebedenco at tasksistemas.com.br
Thu Sep 4 20:35:46 CEST 2008


Hello people,

here is a quick fix for the output of the command usb storage. It was printing  
"Device 0: not available" because the IF_TYPE_USB was not included into the 
switch statement.

--- u-boot-1.3.4.original/disk/part.c	2008-08-12 11:08:38.000000000 -0300
+++ u-boot-1.3.4/disk/part.c	2008-09-04 14:48:55.000000000 -0300
@@ -124,6 +124,12 @@ void dev_print (block_dev_desc_t *dev_de
 			dev_desc->revision,
 			dev_desc->product);
 		break;
+	case IF_TYPE_USB:
+		printf ("Vendor: %s Rev: %s Prod: %s\n",
+			dev_desc->vendor,
+			dev_desc->revision,
+			dev_desc->product);
+		break;
 	case IF_TYPE_UNKNOWN:
 	default:
 		puts ("not available\n");
--

Now, for example, with my usb kingston datatraveller, it correctly prints:

U-Boot> usb storage
  Device 0: Vendor: Kingston Rev: 1.00 Prod: DataTraveler 2.0
            Type: Removable Hard Disk
            Capacity: 1956.5 MB = 1.9 GB (4006912 x 512) 

Regards,

Nícolas


More information about the U-Boot mailing list