summaryrefslogtreecommitdiffstats
path: root/lib/libdisk
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-11-12 17:44:37 +0000
committermarcel <marcel@FreeBSD.org>2003-11-12 17:44:37 +0000
commit58594e4f865859b55305336030f06daf5d44930d (patch)
treeca3002a69d58622b8d4f41d98ea8c4df999cff57 /lib/libdisk
parent63e182bbf560e95bf316dbbf72e3d218520fa59c (diff)
downloadFreeBSD-src-58594e4f865859b55305336030f06daf5d44930d.zip
FreeBSD-src-58594e4f865859b55305336030f06daf5d44930d.tar.gz
The partition naming on ia64 (e.g. da0p1) cannot be selected based
on whether the parent chunk is of type whole. This also applies to MBR slices for non-GPT disks. Since most of the GPT handling is conditionally compiled, do the same with the partition naming. This fixes a braino that caused slices to be named as GPT partitions and generally messing up an install. Pointy hat: marcel
Diffstat (limited to 'lib/libdisk')
-rw-r--r--lib/libdisk/create_chunk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libdisk/create_chunk.c b/lib/libdisk/create_chunk.c
index fb3daec..d3625b9 100644
--- a/lib/libdisk/create_chunk.c
+++ b/lib/libdisk/create_chunk.c
@@ -159,8 +159,12 @@ Fixup_Names(struct disk *d)
max = NDOSPART;
#endif
for (j = 1; j <= max; j++) {
+#ifdef __ia64__
sprintf(c2->oname, "%s%c%d", c1->name,
(c1->type == whole) ? 'p' : 's', j);
+#else
+ sprintf(c2->oname, "%ss%d", c1->name, j);
+#endif
for (c3 = c1->part; c3; c3 = c3->next)
if (c3 != c2 && !strcmp(c3->name, c2->oname))
goto match;
OpenPOWER on IntegriCloud