summaryrefslogtreecommitdiff
path: root/disk
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-07-28 22:35:39 +0200
committerWolfgang Denk <wd@denx.de>2009-08-09 22:52:38 +0200
commit716655288a53c95fad203ebf21d0b8ffdc2f7525 (patch)
tree1880f9ed3e4cdbf6820a07a3f713953d56720a55 /disk
parent3f1649fb0dfb1e5c8890de154c332c394db5cdb5 (diff)
downloadu-boot-imx-716655288a53c95fad203ebf21d0b8ffdc2f7525.zip
u-boot-imx-716655288a53c95fad203ebf21d0b8ffdc2f7525.tar.gz
u-boot-imx-716655288a53c95fad203ebf21d0b8ffdc2f7525.tar.bz2
Partition support: remove newline from partition name
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>
Diffstat (limited to 'disk')
-rw-r--r--disk/part_dos.c15
-rw-r--r--disk/part_efi.c2
-rw-r--r--disk/part_iso.c15
3 files changed, 21 insertions, 11 deletions
diff --git a/disk/part_dos.c b/disk/part_dos.c
index 93bf3dd..b915eb7 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -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); */
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 626f022..1b04c27 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -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__,
diff --git a/disk/part_iso.c b/disk/part_iso.c
index 8fe6148..990da95 100644
--- a/disk/part_iso.c
+++ b/disk/part_iso.c
@@ -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