From: Scott Moser <smoser@ubuntu.com>
To: "Dale R. Worley" <worley@alum.mit.edu>
Cc: util-linux@vger.kernel.org
Subject: Re: GPT writing of unknown partition uuids
Date: Wed, 15 Jul 2015 09:28:32 -0400 (EDT) [thread overview]
Message-ID: <alpine.DEB.2.02.1507150920190.30147@brickies> (raw)
In-Reply-To: <87mvyymf1p.fsf@hobgoblin.ariadne.com>
On Tue, 14 Jul 2015, Dale R. Worley wrote:
> Scott Moser <smoser@ubuntu.com> writes:
> > If sfdisk does not know the uuid provided, it silently falls back to
> > 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem).
> >
> > It seems like if the user provided you with a GUID, sfdisk should trust
> > them, or at very least exit failure if it refuses to use the provided
> > GUID.
>
> Ugh, you're right! Silent disobedience is pernicious.
My hack / "will this work" to fdisk_label_parse_parttype seemed to get a
functional fdisk_new_unknown_parttype that would be used.
diff --git a/libfdisk/src/parttype.c b/libfdisk/src/parttype.c
index aedf4e8..bda850a 100644
--- a/libfdisk/src/parttype.c
+++ b/libfdisk/src/parttype.c
@@ -335,6 +335,7 @@ struct fdisk_parttype *fdisk_label_parse_parttype(
if (ret)
goto done;
+ typestr = str;
/* maybe specified by order number */
errno = 0;
i = strtol(str, &end, 0);
@@ -347,7 +348,7 @@ struct fdisk_parttype *fdisk_label_parse_parttype(
ret = fdisk_new_unknown_parttype(code, typestr);
done:
- DBG(PARTTYPE, ul_debugobj(ret, "returns parsed '%s' partition type", ret->name));
+ DBG(PARTTYPE, ul_debugobj(ret, "returns parsed '%s' partition type (%s)", ret->name, ret->typestr));
return ret;
}
next prev parent reply other threads:[~2015-07-15 13:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 20:16 GPT writing of unknown partition uuids Scott Moser
2015-07-15 0:37 ` Dale R. Worley
2015-07-15 13:28 ` Scott Moser [this message]
2015-07-15 13:42 ` Karel Zak
2015-07-15 14:56 ` Scott Moser
2015-07-15 15:02 ` Karel Zak
2015-07-15 15:09 ` Vadim Kochan
2015-07-15 15:12 ` Vadim Kochan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.02.1507150920190.30147@brickies \
--to=smoser@ubuntu.com \
--cc=util-linux@vger.kernel.org \
--cc=worley@alum.mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox