kern/142174: gpart fails to correctly set partition type for GPT
Przemyslaw Laczynski
torindel at gmail.com
Wed Dec 30 18:40:01 UTC 2009
>Number: 142174
>Category: kern
>Synopsis: gpart fails to correctly set partition type for GPT
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Dec 30 18:40:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Przemyslaw Laczynski
>Release: 9.0-CURRENT at 20091229
>Organization:
>Environment:
FreeBSD localhost 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Wed Dec 30 14:15:23 UTC 2009 root@:/usr/src/sys/amd64/compile/GENERIC amd64
>Description:
gpart fails to correctly create/modify GPT entry partition types and sets it to "!00000000-0000-0000-0000-000000000000" or leaves it unchanged.
Full problem log bellow.
>How-To-Repeat:
localhost# gpart create -s GPT ad4
ad4 created
localhost# gpart add -t freebsd-ufs ad4
ad4p1 added
localhost# gpart show ad4
=> 34 15038397 ad4 GPT (7.2G)
34 15038397 1 !00000000-0000-0000-0000-000000000000 (7.2G)
>Fix:
Apply patch
Patch attached with submission follows:
--- /usr/src/sys/geom/part/g_part_gpt.c 2009-12-30 18:27:25.000000000 +0000
+++ /usr/src/sys/geom/part/g_part_gpt.c 2009-12-30 19:10:50.000000000 +0000
@@ -375,7 +375,7 @@ gpt_parse_type(const char *type, struct uuid *uuid)
for (uap = &gpt_uuid_alias_match[0]; uap->uuid; uap++) {
alias = g_part_alias_name(uap->alias);
if (!strcasecmp(type, alias)) {
- uuid = uap->uuid;
+ *uuid = *uap->uuid;
return (0);
}
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list