From: Karel Zak <kzak@redhat.com>
To: Toomas Losin <tlo@lenrek.net>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH] libfdisk: Fix randomly generated GPT UUID's
Date: Thu, 9 Mar 2023 13:06:10 +0100 [thread overview]
Message-ID: <20230309120610.zif6ta4g6mgqsgud@ws.net.home> (raw)
In-Reply-To: <20230305155755.49a0534e@marley.lenrek.net>
On Sun, Mar 05, 2023 at 03:57:55PM -0800, Toomas Losin wrote:
> libfdisk/src/gpt.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Applied, thanks!
>
> diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c
> index d7b3e1c70..c3c0347cb 100644
> --- a/libfdisk/src/gpt.c
> +++ b/libfdisk/src/gpt.c
> @@ -878,9 +878,9 @@ static int gpt_mknew_header(struct fdisk_context *cxt,
> if (!has_id) {
> struct gpt_guid guid;
>
> - uuid_generate_random((unsigned char *) &header->disk_guid);
> - guid = header->disk_guid;
> + uuid_generate_random((unsigned char *) &guid);
> swap_efi_guid(&guid);
> + header->disk_guid = guid;
> }
Good catch, stupid bug.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
prev parent reply other threads:[~2023-03-09 12:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-05 23:57 [PATCH] libfdisk: Fix randomly generated GPT UUID's Toomas Losin
2023-03-09 12:06 ` Karel Zak [this message]
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=20230309120610.zif6ta4g6mgqsgud@ws.net.home \
--to=kzak@redhat.com \
--cc=tlo@lenrek.net \
--cc=util-linux@vger.kernel.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).