all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pavel Shlyak <shlyakpavel@gmail.com>
To: 55406@debbugs.gnu.org
Subject: bug#55406: GUIX Image API: wrong fs type and flag
Date: Sun, 15 May 2022 20:11:11 +0300	[thread overview]
Message-ID: <1219026A-541C-4689-9C3E-C35A8F39E30B@gmail.com> (raw)
In-Reply-To: <3078A40B-22B0-4492-BFD2-72D725F31689@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 705 bytes --]

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"))))

[-- Attachment #2: Type: text/html, Size: 2796 bytes --]

  parent reply	other threads:[~2022-05-16 10:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 21:46 bug#55406: GUIX Image API: wrong fs type and flag Pavel Shlyak
2022-05-15 17:00 ` Pavel Shlyak
2022-05-15 17:11 ` Pavel Shlyak [this message]
2022-05-20 17:01 ` bug#55406: WIP: Image API support for fat16 partitions Pavel Shlyak
2022-05-20 19:54 ` Pavel Shlyak
2022-05-21 13:09 ` bug#55406: Patch to handle boot flag in Image API Pavel Shlyak
2022-05-22 13:33   ` bug#55406: GUIX Image API: wrong fs type and flag Mathieu Othacehe
2022-05-22 14:02     ` bug#55406: [PATCH] GUIX Image API support for vfat and boot flag Pavel Shlyak
2022-05-23  8:30       ` bug#55406: GUIX Image API: wrong fs type and flag Mathieu Othacehe

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=1219026A-541C-4689-9C3E-C35A8F39E30B@gmail.com \
    --to=shlyakpavel@gmail.com \
    --cc=55406@debbugs.gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.