From patchwork Tue Apr 15 20:49:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 881385 Delivered-To: patch@linaro.org Received: by 2002:adf:f902:0:b0:38f:210b:807b with SMTP id b2csp653038wrr; Tue, 15 Apr 2025 13:50:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXh7wQYe0+233lGben4r2lgZGLw6fbqeqDYyw8V7hOF8oSkdbzue79z0VLNHrSA3rGHN2pXOQ==@linaro.org X-Google-Smtp-Source: AGHT+IES1FlbEuGRYYcx27HeA318Z2epkNFiMPdvbpYmvuCxJbCs2H3MqSFtEWXMr3Z4O3BxRgLG X-Received: by 2002:a05:6102:3b11:b0:4c4:dead:59ab with SMTP id ada2fe7eead31-4cb528a60b7mr623814137.5.1744750211227; Tue, 15 Apr 2025 13:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1744750211; cv=none; d=google.com; s=arc-20240605; b=lf1lTGqTf7FskKWgH5fPHxdpSuMAypTsV5gzrW6ZkYsvLY8ONXztoRHZZ8aXrqqxMH NThwo4RQ7q5n7aX3IbtaATqhOdXILnseBtPMSEYAHT/OMppX76ZJfAFAMF6w5JUKvC+n td+bSYrlDO2T/Pc28YaXp8pYTIz32JtMQkm1e6GJrOBYXyYxd4Iw/2bjQHR6nDdnFIYC 2qgAZ0TDo8YjWRe/lxs+hxuZvosyDM58O4RinJeFqlRxHzdEuETeyqozONYiIKi38wCv MKUyEu+5Tm6LopRBGwKTLkNLGalp1f9Qf+l73wyqx36zPgQF4Qy5DCz8DtsTUgMb/I97 tQtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kpI66hsnd4VVAxKYGujgtBn62XBm84cFwii+PeTWgiQ=; fh=t2RhDijD+M8wRN99GcMwPVsHsJhjnTbBaLunZUx+L5Q=; b=J8tOM2UD8vcaHFixMIl17XJBHkuqU5VySiDqbZJBA3bJpw6OBnB/TPEr3LQysjAn5y ja0qyg4FW/n+qoKuPHFnRtP6yR0XU2+yvRGQv6MSSMFkcL1MhGqYuIBab9ygs20Tej5F yg+6T1zChJdryy/kKjD3crtW/o+DOu/8br25DltrMrC074gHzvnFH2lHixHpbA61+30q hQkaBqUu+0/hhsj1IcH/ICs5ExjGSPh0djOcJS5gDGUWFQivPvHq17+vkcxdAXl7cJGI H2yeQZXSy4YezbmOGCL0QgmZPjDMVt60oVMs5FMuSHyaFAWihEutZC8q05ULYEu9X538 C+/Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=khwwd0qH; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id ada2fe7eead31-4c9c9890f34si4960894137.309.2025.04.15.13.50.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Apr 2025 13:50:11 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=khwwd0qH; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1590282B44; Tue, 15 Apr 2025 22:50:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="khwwd0qH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4398A81F7E; Tue, 15 Apr 2025 22:49:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3C8F182A27 for ; Tue, 15 Apr 2025 22:49:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jerome.forissier@linaro.org Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43d0c18e84eso30636665e9.3 for ; Tue, 15 Apr 2025 13:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1744750195; x=1745354995; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kpI66hsnd4VVAxKYGujgtBn62XBm84cFwii+PeTWgiQ=; b=khwwd0qHcxZAEl5uZjN+RzNYgEuWet6yOzfTCN/x8qjLCwK6pWkBm+3rmrTjMyfuVR dhUHjjFkBGzqA/4j39z5Sz/aoFIbS1puxe2NyLntmiHnSkTFA6giSsfWGTF3vrO1arr1 BdDF/YWUT3R22Wld3rVaTjP19gFbXkNBAM58HAdhVesxJmJsGbrxWaaHkWTTZYRhQTCz MDmDUAEXPlDA6zT20LRCRsvatzs3YDVX/H7ZYLZvtx+PX3ZO6F7gS2XiCI7ceB2RIkmB ebHwRRBUslJGyXoNZ/WJNKn3OiLsNyKbEHVHh31komddAQgHp2gY2aG91TIZmPOOwtfN kf1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744750195; x=1745354995; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kpI66hsnd4VVAxKYGujgtBn62XBm84cFwii+PeTWgiQ=; b=p1HubHBQsAS43a8Zy5qggf4niXPFsc/DwO+uaYZboQVH7CWUwiXFTZoTWR4eJYlouR qVD6kG25S2G2ZJq32kzTrgD/yOZMrnOG7cER9hu/SWDtL3tpVMa89/bHgyhe1CTOVn0e oLQFdOER8QFQbioAvBiYwx6iHFdgF5BR1zemdNI1t3CDf0lVzxQ3OKrHYPc7UM/ZpZpV cJcCW0h3uuUDwGqyf1VHRCxrsuOk3BatEWqa4duKpkVJvmjld2FDwCsIrkDOg72QNyr9 d4ALRI/B88PjuwBKMW0HgxCigRQ9QrS1OEAGFVMOk3LgIZK1NLNGojvzT4QDiDrSrS1u IAnQ== X-Gm-Message-State: AOJu0YwbZ6TQWc3SFFaOSIVeaK6Fi8R5HTOktxW0VZlQvRBxvoDEQdaC SzztquZpzUV9LZD9PpYMIIZpNIXOnLVJnAc7fRsx443j5E7UPZI0nXCEJPWzTI6WrQzyx9amBxl qKJQ= X-Gm-Gg: ASbGnctIlJ5tqD1BjPBqrHLWceVN0w2MX22WaIhmGguorEbCzb8zdpEpkmDJnC7ZqPD Ze9DXUVJWEa54LyfvoM+bhfF0fFT+hBCyfpCFtKbNb5N5tVymEIjU/98gOr4wOqrfZHOQOSNpfB u5K7RXylT7LXCMIDVL1IPcvAzgvvrmeaiZ76Bv2AhLE2KhsJUVEiJ6XPJ9g+GmQcVIUTNGmkuzV hoDIlsdKLFHsRDprRlJPG8SaxG+bKo+hI2y7W5DLabLnH3LBZJAGmRZ0oqf2lQg5vS+fd+xqaWI T1Bj8sggdbB3Hxni5NlsmyqWzi+VmiU0o4VdtJtnRap4PGNd X-Received: by 2002:a05:600c:5107:b0:43d:db5:7af8 with SMTP id 5b1f17b1804b1-4405a0f94a3mr3613025e9.21.1744750195578; Tue, 15 Apr 2025 13:49:55 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:6ebc:6ce:770e:95f9]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4405b4f3ed7sm617675e9.24.2025.04.15.13.49.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Apr 2025 13:49:55 -0700 (PDT) From: Jerome Forissier To: U-Boot mailing list Cc: Jerome Forissier , Heinrich Schuchardt , Caleb Connolly , Ilias Apalodimas , Marek Vasut , Mattijs Korpershoek , Patrick Delaunay , Raymond Mao , Simon Glass , Tom Rini , =?utf-8?q?Vincent_Stehl=C3=A9?= Subject: [PATCH v2 1/2] lib/uuid.c: use unique name for PARTITION_SYSTEM_GUID Date: Tue, 15 Apr 2025 22:49:02 +0200 Message-ID: <20250415204917.1250109-2-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250415204917.1250109-1-jerome.forissier@linaro.org> References: <20250415204917.1250109-1-jerome.forissier@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The name defined for PARTITION_SYSTEM_GUID in list_guid[] depends on configuration options. It is "system" if CONFIG_PARTITION_TYPE_GUID is enabled or "System Partition" if CONFIG_CMD_EFIDEBUG or CONFIG_EFI are enabled. In addition, the unit test in test/common/print.c is incorrect because it expects only "system" (or a hex GUID). Make things more consistent by using a clear and unique name: "EFI System Partition" whatever the configuration, and update the unit test accordingly. Signed-off-by: Jerome Forissier Suggested-by: Heinrich Schuchardt --- Changes in v2: - Remove useless braces in if expression - Change partition name and make it the same for all configs. Update the commit subject. lib/uuid.c | 4 ++-- test/common/print.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/uuid.c b/lib/uuid.c index 75658778044..4ad2cca64c5 100644 --- a/lib/uuid.c +++ b/lib/uuid.c @@ -68,7 +68,7 @@ static const struct { } list_guid[] = { #ifndef USE_HOSTCC #ifdef CONFIG_PARTITION_TYPE_GUID - {"system", PARTITION_SYSTEM_GUID}, + {"EFI System Partition", PARTITION_SYSTEM_GUID}, {"mbr", LEGACY_MBR_PARTITION_GUID}, {"msft", PARTITION_MSFT_RESERVED_GUID}, {"data", PARTITION_BASIC_DATA_GUID}, @@ -184,7 +184,7 @@ static const struct { EFI_TCG2_PROTOCOL_GUID, }, { - "System Partition", + "EFI System Partition", PARTITION_SYSTEM_GUID }, { diff --git a/test/common/print.c b/test/common/print.c index e3711b10809..c48efc2783f 100644 --- a/test/common/print.c +++ b/test/common/print.c @@ -45,11 +45,11 @@ static int print_guid(struct unit_test_state *uts) sprintf(str, "%pUL", guid); ut_asserteq_str("04030201-0605-0807-090A-0B0C0D0E0F10", str); sprintf(str, "%pUs", guid_esp); - if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)) { /* brace needed */ - ut_asserteq_str("system", str); - } else { + if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID) || + IS_ENABLED(CONFIG_CMD_EFIDEBUG) || IS_ENABLED(CONFIG_EFI)) + ut_asserteq_str("EFI System Partition", str); + else ut_asserteq_str("c12a7328-f81f-11d2-ba4b-00a0c93ec93b", str); - } ret = snprintf(str, 4, "%pUL", guid); ut_asserteq(0, str[3]); ut_asserteq(36, ret);