From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SBHmBvkngmI8xgAAbAwnHQ (envelope-from ) for ; Mon, 16 May 2022 12:31:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id uLfjBvkngmLb3QAA9RJhRA (envelope-from ) for ; Mon, 16 May 2022 12:31:21 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A03ED1BF55 for ; Mon, 16 May 2022 12:31:20 +0200 (CEST) Received: from localhost ([::1]:60878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nqY0V-0002Ok-HX for larch@yhetil.org; Mon, 16 May 2022 06:31:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqHmk-0006VL-OP for bug-guix@gnu.org; Sun, 15 May 2022 13:12:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56666) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nqHmk-0000iu-FR for bug-guix@gnu.org; Sun, 15 May 2022 13:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nqHmk-0004Qj-9g for bug-guix@gnu.org; Sun, 15 May 2022 13:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#55406: GUIX Image API: wrong fs type and flag References: <3078A40B-22B0-4492-BFD2-72D725F31689@gmail.com> In-Reply-To: <3078A40B-22B0-4492-BFD2-72D725F31689@gmail.com> Resent-From: Pavel Shlyak Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 15 May 2022 17:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55406 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 55406@debbugs.gnu.org Received: via spool by 55406-submit@debbugs.gnu.org id=B55406.165263468016980 (code B ref 55406); Sun, 15 May 2022 17:12:02 +0000 Received: (at 55406) by debbugs.gnu.org; 15 May 2022 17:11:20 +0000 Received: from localhost ([127.0.0.1]:50563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqHm4-0004Po-FZ for submit@debbugs.gnu.org; Sun, 15 May 2022 13:11:20 -0400 Received: from mail-ej1-f45.google.com ([209.85.218.45]:36419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqHm3-0004Pb-Hf for 55406@debbugs.gnu.org; Sun, 15 May 2022 13:11:19 -0400 Received: by mail-ej1-f45.google.com with SMTP id z2so24673471ejj.3 for <55406@debbugs.gnu.org>; Sun, 15 May 2022 10:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:mime-version:subject:message-id:date:to; bh=oAHtv9+Dur1c3SwbPSb77xaGQRgKgQ0Lii7J2GnzTUc=; b=BQR6NpFuDLhOEfMP358uwnt/JYPX6It4N7HZvIePywioFyjeljJndeMRiimsHHqNhc w464w7H9ZSziCLiP7kia2TMrd5GWLKcJ1O77qu/a+f8iGjO0agl82drJeqq1eljfNdui 0Oo2mI+mF6Ok8lhogcGDpogCzyjaAl6m9EU/jzlj/jrsqf+Zmh1KGqq1CaRxAMbBTSYy U4iTPZhmXytHs5cYmJP5+QGF2brLV05XF7SeA89w45qJd2cJu4qf2Cl7ofBcLw0c2/m2 oPkM6HnV9B3Q6tMr+eN7D9/1KB2xwprLtDZitn/O9l7dCQVgS0VDMQIbpFvjVSeOHOmj ejKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=oAHtv9+Dur1c3SwbPSb77xaGQRgKgQ0Lii7J2GnzTUc=; b=HxETX6zsa8DbrAslaOdGN2KV7LhyafzzsQOXMoVqBONnBOX0lmxv1uq4MUyqxmKQMO 5djfbB7ziyGlCIoRRUvPYjX38+y+mSXPMqm+NjY3BnaRRN9VrhJK6XcdZ+DcuySr4k5o 1CfgwiVPzSpAtPYWpIVJo8XB9Fm4/Gi27hPtAdE4+OTpao2SWvnawwheh5k7kkDDXn+b S4VAVKf1tBGeopz5l3eXD6KDoUX5mG+Fpq7TAkGQuKlVlnC/Moot0ZLy6AJgnKhh6KEe O67FGaEic3qmKIN7NEuDq8/UZaoRp/hquYvK37Eje6VWJV0hlsoioV0+/hJNeXrd3jQI sqnw== X-Gm-Message-State: AOAM531k96U3y5iPoUqDWNl5CU+vQbEGMTFWhqb3xL2IqBH/GqxPam7F 2OwOkYAe9PmRPA8DYSZyV9tBb8lxC34= X-Google-Smtp-Source: ABdhPJxQn3V5+jfws3JWUX5J7L1RtXdZ9U1aroct8CptTPnonkOHg6MS97DLn+shOHIBmw2+kf68jA== X-Received: by 2002:a17:906:9b92:b0:6fd:e4ce:e416 with SMTP id dd18-20020a1709069b9200b006fde4cee416mr12385205ejc.394.1652634673132; Sun, 15 May 2022 10:11:13 -0700 (PDT) Received: from smtpclient.apple ([78.188.101.200]) by smtp.gmail.com with ESMTPSA id 28-20020a170906101c00b006f3ef214e0dsm2803193ejm.115.2022.05.15.10.11.12 for <55406@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 May 2022 10:11:12 -0700 (PDT) From: Pavel Shlyak Content-Type: multipart/alternative; boundary="Apple-Mail=_718FC3BA-CCEF-4DE1-B737-D18C5869EE94" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Message-Id: <1219026A-541C-4689-9C3E-C35A8F39E30B@gmail.com> Date: Sun, 15 May 2022 20:11:11 +0300 X-Mailer: Apple Mail (2.3696.80.82.1.1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Mon, 16 May 2022 06:31:02 -0400 X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652697080; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=oAHtv9+Dur1c3SwbPSb77xaGQRgKgQ0Lii7J2GnzTUc=; b=DRMcnTZm7IcHgR92lU5sXm07sefRcRj4tAJfHA4rwVewghaP7dmW72I8hHUHnZR9VdisTq SmDYj6IUWYf+6ev/Kh5l68Gc5rB6MAMjRNfRGcgahD2EVCqNB9oK+OLzaUektWeKzaIlPV IGxX6rzzqUicu3BIoHzYGx71D9+SlgLRBct/l2ENoXWMfKw+fm1AxTVUjUtNdNx+gfi78K T+/guPI+S4wRBPPjAbLZOqHBksF5TmCavhRyYHoYHJabOsSiVf4+re0rX+AeacO5KCmJrW +QYaiG9c3ih8xdOotVymXLCbTYJsZZFsaF9lUp9CemoNNYQcLzRTBsfj1LnTXw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652697080; a=rsa-sha256; cv=none; b=GValnbrYr38JTe5URv+6jYAjp/w64hJI1/genSqY/SuMgjY4CLGNZMVUO4rAMS4iwoQM7X M8BXxNrpvqpSFX2/VPol8EHkypTFJkdRGlydbGhg7RsSlJMgSeV2TvjuBCw1ZZESur8EdW hJJXaAw/9ZxRRuhFYtHgEy1tk3hTTkkF1iD38Qh275JuM1kmL3scmLZkHqzQ07JTbvJ5CN eIXHcpM0QoUd66mbfIDs1EiFm/CuO8aCOVUMjKNiJohMGv/soI7tpm/OamsbduOHtjPwwN lKtNTpOgNGii07dfszGN8tMx0bVtpXWBAxa43kf5I2QHbzRzATUw8y6RBVNk7A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=BQR6NpFu; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.07 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=BQR6NpFu; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A03ED1BF55 X-Spam-Score: 5.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: VkIlG69t53HM --Apple-Mail=_718FC3BA-CCEF-4DE1-B737-D18C5869EE94 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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"))))= --Apple-Mail=_718FC3BA-CCEF-4DE1-B737-D18C5869EE94 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii 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.
<= div class=3D""> (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.
= --Apple-Mail=_718FC3BA-CCEF-4DE1-B737-D18C5869EE94--