Signed-off-by: Detlev Zundel <[EMAIL PROTECTED]>
---
 disk/part.c |   32 ++++++++++++++------------------
 1 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/disk/part.c b/disk/part.c
index 3c71208..1f8538a 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -109,29 +109,25 @@ void dev_print (block_dev_desc_t *dev_desc)
        lbaint_t lba512;
 #endif
 
-       if (dev_desc->type==DEV_TYPE_UNKNOWN) {
-               puts ("not available\n");
-               return;
-       }
-       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",
+       switch (dev_desc->type) {
+       case IF_TYPE_SCSI:
+               printf ("(%d:%d) Vendor: %s Prod.: %s Rev: %s\n",
+                       dev_desc->target,dev_desc->lun,
                        dev_desc->vendor,
-                       dev_desc->revision,
-                       dev_desc->product);
-       }
-       if (dev_desc->if_type==IF_TYPE_SATA) {
+                       dev_desc->product,
+                       dev_desc->revision);
+               break;
+       case IF_TYPE_IDE:
+       case IF_TYPE_SATA:
                printf ("Model: %s Firm: %s Ser#: %s\n",
                        dev_desc->vendor,
                        dev_desc->revision,
                        dev_desc->product);
-       } else {
-               printf ("Vendor: %s Prod.: %s Rev: %s\n",
-                       dev_desc->vendor,
-                       dev_desc->product,
-                       dev_desc->revision);
+               break;
+       case DEV_TYPE_UNKNOWN:
+       default:
+               puts ("not available\n");
+               return;
        }
        puts ("            Type: ");
        if (dev_desc->removable)
-- 
1.5.4.2


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to