Fix incorrect switch for IF_TYPE in part.c
authorTor Krill <tor@excito.com>
Thu, 29 May 2008 09:10:30 +0000 (11:10 +0200)
committerWolfgang Denk <wd@denx.de>
Tue, 3 Jun 2008 19:46:39 +0000 (21:46 +0200)
Use correct field in block_dev_desc_t when writing interface type in
dev_print. Error introduced in 574b3195.

Also added fix from Martin Krause

Signed-off-by: Tor Krill <tor@excito.com>
disk/part.c

index 316e2547399c002c2bdc0c765ee5ae53d3f2fea6..5c4bf6b6142bb68cc190e1a549d9a054742d7606 100644 (file)
@@ -109,7 +109,7 @@ void dev_print (block_dev_desc_t *dev_desc)
        lbaint_t lba512;
 #endif
 
-       switch (dev_desc->type) {
+       switch (dev_desc->if_type) {
        case IF_TYPE_SCSI:
                printf ("(%d:%d) Vendor: %s Prod.: %s Rev: %s\n",
                        dev_desc->target,dev_desc->lun,
@@ -124,7 +124,7 @@ void dev_print (block_dev_desc_t *dev_desc)
                        dev_desc->revision,
                        dev_desc->product);
                break;
-       case DEV_TYPE_UNKNOWN:
+       case IF_TYPE_UNKNOWN:
        default:
                puts ("not available\n");
                return;