Fix disk type output in disk/part.c

Signed-off-by: Detlev Zundel <dzu@denx.de>
master
Detlev Zundel 16 years ago committed by Wolfgang Denk
parent 045b4d2d71
commit 574b319512
  1. 32
      disk/part.c

@ -109,29 +109,25 @@ void dev_print (block_dev_desc_t *dev_desc)
lbaint_t lba512; lbaint_t lba512;
#endif #endif
if (dev_desc->type==DEV_TYPE_UNKNOWN) { switch (dev_desc->type) {
puts ("not available\n"); case IF_TYPE_SCSI:
return; printf ("(%d:%d) Vendor: %s Prod.: %s Rev: %s\n",
} dev_desc->target,dev_desc->lun,
if (dev_desc->if_type==IF_TYPE_SCSI) {
printf ("(%d:%d) ", dev_desc->target,dev_desc->lun);
}
if (dev_desc->if_type==IF_TYPE_IDE) {
printf ("Model: %s Firm: %s Ser#: %s\n",
dev_desc->vendor, dev_desc->vendor,
dev_desc->revision, dev_desc->product,
dev_desc->product); dev_desc->revision);
} break;
if (dev_desc->if_type==IF_TYPE_SATA) { case IF_TYPE_IDE:
case IF_TYPE_SATA:
printf ("Model: %s Firm: %s Ser#: %s\n", printf ("Model: %s Firm: %s Ser#: %s\n",
dev_desc->vendor, dev_desc->vendor,
dev_desc->revision, dev_desc->revision,
dev_desc->product); dev_desc->product);
} else { break;
printf ("Vendor: %s Prod.: %s Rev: %s\n", case DEV_TYPE_UNKNOWN:
dev_desc->vendor, default:
dev_desc->product, puts ("not available\n");
dev_desc->revision); return;
} }
puts (" Type: "); puts (" Type: ");
if (dev_desc->removable) if (dev_desc->removable)

Loading…
Cancel
Save