guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#62827] [PATCH] image: Add partition type-uuid support.


From: Josselin Poiret
Subject: [bug#62827] [PATCH] image: Add partition type-uuid support.
Date: Sat, 13 May 2023 10:06:01 +0200

Hi Aleksandr,

Aleksandr Vityazev <avityazew@gmail.com> writes:

> @@ -364,8 +365,10 @@ (define (partition->dos-type partition)
>        ;; Return the MBR partition type corresponding to the given PARTITION.
>        ;; See: https://en.wikipedia.org/wiki/Partition_type.
>        (let ((flags (partition-flags partition))
> -            (file-system (partition-file-system partition)))
> +            (file-system (partition-file-system partition))
> +            (type-uuid (partition-type-uuid partition)))
>          (cond
> +         (type-uuid (uuid->string type-uuid))
>           ((member 'esp flags) "0xEF")
>           ((string-prefix? "ext" file-system) "0x83")
>           ((or (string=? file-system "vfat")

MBR partitions use a single byte to represent the type, and we don't
have any corresponding uuid type for that, so this wouldn't work.
Adding a UUID type for MBR should be the way forward.

The GPT partition side seems good to me, but it would be nice if the
description in the manual included the expected formats of the UUIDs,
depending on the partition table type.  Examples would be welcome there
as well.

Best,
-- 
Josselin Poiret

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]