GNU bug report logs - #55406
GUIX Image API: wrong fs type and flag

Previous Next

Package: guix;

Reported by: Pavel Shlyak <shlyakpavel <at> gmail.com>

Date: Fri, 13 May 2022 23:01:03 UTC

Severity: normal

Merged with 55405

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pavel Shlyak <shlyakpavel <at> gmail.com>
To: 55406 <at> debbugs.gnu.org
Subject: bug#55406: GUIX Image API: wrong fs type and flag
Date: Sun, 15 May 2022 20:11:11 +0300
[Message part 1 (text/plain, inline)]
I found it. It blows my mind. Let me just cry out here.

    (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)))
        (cond
         ((member 'esp flags) "0xEF")
         (else "0x83"))))

    (define (partition->gpt-type partition)
      ;; Return the genimage GPT partition type code corresponding to PARTITION.
      ;; See https://github.com/pengutronix/genimage/blob/master/README.rst
      (let ((flags (partition-flags partition)))
        (cond
          ((member 'esp flags) "U")
          (else "L"))))
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.