Partition support: remove newline from partition name
authorWolfgang Denk <wd@denx.de>
Tue, 28 Jul 2009 20:35:39 +0000 (22:35 +0200)
committerWolfgang Denk <wd@denx.de>
Sun, 9 Aug 2009 20:52:38 +0000 (22:52 +0200)
Remove bogus newline character that got added to the .name field of
the disk_partition_t structure.

Signed-off-by: Wolfgang Denk <wd@denx.de>
disk/part_dos.c
disk/part_efi.c
disk/part_iso.c

index 93bf3dd4ea9d98028512829ddb7eaf287863a7ad..b915eb7484d3f9b8c95553d5fb444c69af95a620 100644 (file)
@@ -198,19 +198,24 @@ static int get_partition_info_extended (block_dev_desc_t *dev_desc, int ext_part
                                case IF_TYPE_IDE:
                                case IF_TYPE_SATA:
                                case IF_TYPE_ATAPI:
-                                       sprintf ((char *)info->name, "hd%c%d\n", 'a' + dev_desc->dev, part_num);
+                                       sprintf ((char *)info->name, "hd%c%d",
+                                               'a' + dev_desc->dev, part_num);
                                        break;
                                case IF_TYPE_SCSI:
-                                       sprintf ((char *)info->name, "sd%c%d\n", 'a' + dev_desc->dev, part_num);
+                                       sprintf ((char *)info->name, "sd%c%d",
+                                               'a' + dev_desc->dev, part_num);
                                        break;
                                case IF_TYPE_USB:
-                                       sprintf ((char *)info->name, "usbd%c%d\n", 'a' + dev_desc->dev, part_num);
+                                       sprintf ((char *)info->name, "usbd%c%d",
+                                               'a' + dev_desc->dev, part_num);
                                        break;
                                case IF_TYPE_DOC:
-                                       sprintf ((char *)info->name, "docd%c%d\n", 'a' + dev_desc->dev, part_num);
+                                       sprintf ((char *)info->name, "docd%c%d",
+                                               'a' + dev_desc->dev, part_num);
                                        break;
                                default:
-                                       sprintf ((char *)info->name, "xx%c%d\n", 'a' + dev_desc->dev, part_num);
+                                       sprintf ((char *)info->name, "xx%c%d",
+                                               'a' + dev_desc->dev, part_num);
                                        break;
                        }
                        /* sprintf(info->type, "%d, pt->sys_ind); */
index 626f022f9d588330c22532d2302fbeb790fe6310..1b04c27cea914186eea0187713287e19b13e6f9e 100644 (file)
@@ -169,7 +169,7 @@ int get_partition_info_efi(block_dev_desc_t * dev_desc, int part,
                     - info->start;
        info->blksz = GPT_BLOCK_SIZE;
 
-       sprintf((char *)info->name, "%s%d\n", GPT_ENTRY_NAME, part);
+       sprintf((char *)info->name, "%s%d", GPT_ENTRY_NAME, part);
        sprintf((char *)info->type, "U-Boot");
 
        debug("%s: start 0x%lX, size 0x%lX, name %s", __FUNCTION__,
index 8fe6148c21854ef6d5a0a3ae48da3b89185bdccd..990da956cf52224949c9ddf951aefa945439fe12 100644 (file)
@@ -161,19 +161,24 @@ int get_partition_info_iso_verb(block_dev_desc_t * dev_desc, int part_num, disk_
                case IF_TYPE_IDE:
                case IF_TYPE_SATA:
                case IF_TYPE_ATAPI:
-                       sprintf ((char *)info->name, "hd%c%d\n", 'a' + dev_desc->dev, part_num);
+                       sprintf ((char *)info->name, "hd%c%d",
+                               'a' + dev_desc->dev, part_num);
                        break;
                case IF_TYPE_SCSI:
-                       sprintf ((char *)info->name, "sd%c%d\n", 'a' + dev_desc->dev, part_num);
+                       sprintf ((char *)info->name, "sd%c%d",
+                               'a' + dev_desc->dev, part_num);
                        break;
                case IF_TYPE_USB:
-                       sprintf ((char *)info->name, "usbd%c%d\n", 'a' + dev_desc->dev, part_num);
+                       sprintf ((char *)info->name, "usbd%c%d",
+                               'a' + dev_desc->dev, part_num);
                        break;
                case IF_TYPE_DOC:
-                       sprintf ((char *)info->name, "docd%c%d\n", 'a' + dev_desc->dev, part_num);
+                       sprintf ((char *)info->name, "docd%c%d",
+                               'a' + dev_desc->dev, part_num);
                        break;
                default:
-                       sprintf ((char *)info->name, "xx%c%d\n", 'a' + dev_desc->dev, part_num);
+                       sprintf ((char *)info->name, "xx%c%d",
+                               'a' + dev_desc->dev, part_num);
                        break;
        }
        /* the bootcatalog (including validation Entry) is limited to 2048Bytes