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
This commit is contained in:
marcel 2004-10-31 01:28:59 +00:00
parent 17432a99e5
commit e0e7753e22
2 changed files with 3 additions and 2 deletions

View File

@ -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:

View File

@ -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