From e0e7753e228f99241dffacc3ea1edcdfeedf7da6 Mon Sep 17 00:00:00 2001 From: marcel Date: Sun, 31 Oct 2004 01:28:59 +0000 Subject: [PATCH] Don't barf when we encounter an UUID for GPT partitions. Instead, add the GPT partition on i386 and adm64 as type=gpt, subtype=0 and with the sname set to the UUID. This prevents sysinstall from bombing out. This also makes sure the GPT partition shows up in sysinstall so as to avoid accidental "clobberage". PR: bin/72896 --- lib/libdisk/chunk.c | 1 + lib/libdisk/open_disk.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libdisk/chunk.c b/lib/libdisk/chunk.c index ef63ccc90f3..fb43ef5192a 100644 --- a/lib/libdisk/chunk.c +++ b/lib/libdisk/chunk.c @@ -252,6 +252,7 @@ Add_Chunk(struct disk *d, daddr_t offset, daddr_t size, const char *name, case p_amd64: switch (type) { case fat: + case gpt: case mbr: case extended: case freebsd: diff --git a/lib/libdisk/open_disk.c b/lib/libdisk/open_disk.c index 8a8229b41d4..9e487a9bb15 100644 --- a/lib/libdisk/open_disk.c +++ b/lib/libdisk/open_disk.c @@ -167,7 +167,7 @@ Int_Open_Disk(const char *name, char *conftxt) b = strsep(&p, " "); o = strtoimax(b, &r, 0); /* APPLE have ty as a string */ - if ((*r) && strcmp(t, "APPLE")) { + if ((*r) && (strcmp(t, "APPLE") && strcmp(t, "GPT"))) { printf("BARF %d <%d>\n", __LINE__, *r); exit (0); } @@ -256,7 +256,7 @@ Int_Open_Disk(const char *name, char *conftxt) break; } } else if (!strcmp(t, "GPT")) - i = Add_Chunk(d, off, len, n, ty, 0, 0, 0); + i = Add_Chunk(d, off, len, n, gpt, 0, 0, b); else if (!strcmp(t, "APPLE")) i = Add_Chunk(d, off, len, n, apple, 0, 0, sn); else -- 2.45.2