cosmetic: Adjust coding style for switch statements to be consistent

Signed-off-by: Detlev Zundel <dzu@denx.de>
This commit is contained in:
Detlev Zundel 2008-05-05 16:11:22 +02:00 committed by Wolfgang Denk
parent 574b319512
commit 726c0f1e5f
1 changed files with 36 additions and 24 deletions

View File

@ -133,16 +133,21 @@ void dev_print (block_dev_desc_t *dev_desc)
if (dev_desc->removable) if (dev_desc->removable)
puts ("Removable "); puts ("Removable ");
switch (dev_desc->type & 0x1F) { switch (dev_desc->type & 0x1F) {
case DEV_TYPE_HARDDISK: puts ("Hard Disk"); case DEV_TYPE_HARDDISK:
break; puts ("Hard Disk");
case DEV_TYPE_CDROM: puts ("CD ROM"); break;
break; case DEV_TYPE_CDROM:
case DEV_TYPE_OPDISK: puts ("Optical Device"); puts ("CD ROM");
break; break;
case DEV_TYPE_TAPE: puts ("Tape"); case DEV_TYPE_OPDISK:
break; puts ("Optical Device");
default: printf ("# %02X #", dev_desc->type & 0x1F); break;
break; case DEV_TYPE_TAPE:
puts ("Tape");
break;
default:
printf ("# %02X #", dev_desc->type & 0x1F);
break;
} }
puts ("\n"); puts ("\n");
if ((dev_desc->lba * dev_desc->blksz)>0L) { if ((dev_desc->lba * dev_desc->blksz)>0L) {
@ -277,20 +282,27 @@ static void print_part_header (const char *type, block_dev_desc_t * dev_desc)
{ {
puts ("\nPartition Map for "); puts ("\nPartition Map for ");
switch (dev_desc->if_type) { switch (dev_desc->if_type) {
case IF_TYPE_IDE: puts ("IDE"); case IF_TYPE_IDE:
break; puts ("IDE");
case IF_TYPE_SATA: puts ("SATA"); break;
break; case IF_TYPE_SATA:
case IF_TYPE_SCSI: puts ("SCSI"); puts ("SATA");
break; break;
case IF_TYPE_ATAPI: puts ("ATAPI"); case IF_TYPE_SCSI:
break; puts ("SCSI");
case IF_TYPE_USB: puts ("USB"); break;
break; case IF_TYPE_ATAPI:
case IF_TYPE_DOC: puts ("DOC"); puts ("ATAPI");
break; break;
default: puts ("UNKNOWN"); case IF_TYPE_USB:
break; puts ("USB");
break;
case IF_TYPE_DOC:
puts ("DOC");
break;
default:
puts ("UNKNOWN");
break;
} }
printf (" device %d -- Partition Type: %s\n\n", printf (" device %d -- Partition Type: %s\n\n",
dev_desc->dev, type); dev_desc->dev, type);