| Message ID | 20260328171624.2377527-3-dario.binacchi@amarulasolutions.com |
|---|---|
| State | New |
| Headers | show
Return-Path:
<linux-amarula+bncBCQ4XFG47UFRBD42UDHAMGQEWIXQJRI@amarulasolutions.com>
X-Original-To: linux-amarula@patchwork.amarulasolutions.com
Delivered-To: linux-amarula@patchwork.amarulasolutions.com
Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com
[209.85.128.72])
by ganimede.amarulasolutions.com (Postfix) with ESMTPS id CE2153F0C6
for <linux-amarula@patchwork.amarulasolutions.com>;
Sat, 28 Mar 2026 18:17:04 +0100 (CET)
Received: by mail-wm1-f72.google.com with SMTP id
5b1f17b1804b1-4871faccd95sf15999815e9.1
for <linux-amarula@patchwork.amarulasolutions.com>;
Sat, 28 Mar 2026 10:17:04 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1774718224; cv=pass;
d=google.com; s=arc-20240605;
b=CcvlPJbs16hTuy4PE9/wvSTbxJ/7WSXRYRwX36nrEMkHCKLy9g+LdsllAgNQ3fJqie
TibSt+Zvo6s9QjEoBemxkgWm8hp19ls41netOLG8/K5xFY/hk3HJIr+hJ3KbPen4lP/A
7hkhSMSRGg4bC2soE7lz7oXceGSpwAD3fYVsuOR5C+fU0jFeoe2Qkw0STXjZmP8TZfAb
TXfanocUdkwy4PoeXPvAP6xsOIk7LEX46b8ARQ7O8/YYsbrKxsDaIdMv/dhIBoiiWrKb
McMkcTF9tVIvX1Mf2ovdZZbVnTZLnPt5BQMpFIbSsuOzjvTqI6G3aiCpJHQufLB7If0E
u3Ow==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:dkim-signature;
bh=7rPRwTHmorHXFcsBdkrXHL++RMjPFLa3WZo6eQFiybg=;
fh=ox1iKJjybpuG/8LM41lAlQFOXt/5k60MWuxxbfq2FHQ=;
b=VDCLTnguo/QF2AmuOThXXOcDGVCxOkXqORPu0qZqoNCggie1lC4XuIVDJqqTfkDp3W
rj0zDXdWCoSsNKTn3ofpzeJs1YJaXDjGxPCY3w1+scRYQTmghboIwSGz38icJqaWDlYp
6ax8e8/3WnTzTGQP3AcfVTI6nbqoEr1nzNneF8FwrfUhtA2CAAVKw9fgWWz2WxfKyFFZ
FmFfFSXmCEmvUKG8urFkMH4h2HISpaf0+3AK5hfp5+i4U/Bai4LnGJOy5hgvzX8r2VMg
8suK9wMKTdLIwyl/0rsNJAkBzVPLmP+M6asThojwH8cUy9OfiB0dGgy3OjK7+kU3XQ5+
NU5w==;
darn=patchwork.amarulasolutions.com
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b="SYv/TF38";
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@amarulasolutions.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=amarulasolutions.com; s=google; t=1774718224; x=1775323024;
darn=patchwork.amarulasolutions.com;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:x-original-authentication-results
:x-original-sender:mime-version:references:in-reply-to:message-id
:date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=7rPRwTHmorHXFcsBdkrXHL++RMjPFLa3WZo6eQFiybg=;
b=kxQGbIk7OwlLMm0aEkI+xYpETdOWKl/2w0z7sSO0lkVS0RcaJDPwJ/49JQKXDyu3bd
RXrcKI4+TDNWL5vWKH15NigeKiEIo/GK3qQ8hVfbzIlY58rutqjiKByvgzZh7REBOndx
a7hdx2QTRg9KGC7jbBESEjtey1KDBkW0/HtI0=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20251104; t=1774718224; x=1775323024;
h=list-unsubscribe:list-archive:list-help:list-post
:x-spam-checked-in-group:list-id:mailing-list:precedence
:x-original-authentication-results:x-original-sender:mime-version
:references:in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg
:x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=7rPRwTHmorHXFcsBdkrXHL++RMjPFLa3WZo6eQFiybg=;
b=dMRnElqIsmLxH4xEGmv+9Q1JH/YsFIouPZ3i5ZA1HB/GbzcWQryUj4O5UjWCkuxXZm
K1yFhxK8FevW/oN8iAg1Tp33oKiaMfvgDDtg4ZsHEyfEIqK74UIeF3OvMu/50D4dkEny
bsA8oJBJ8rigbokJWaEsv3WHg30Mi24ujx30+pbyUhwt1ZcBhynACf0S5NOqnXAMOisy
QADnhNTEWeYuMMU94Fs9Wd2GCbHJ8DLElq6uoCdhYxEUcN6nCtvW9DwXz+WuX9wd8/hd
OR2Pcepgvpm13HEQLsgOhHLmOf5I9wcgZwUOH4KB0STnGtgNXRG3DfxEkLX0V6+/KtG1
bSQA==
X-Forwarded-Encrypted: i=2;
AJvYcCXIaEzzn2n6Lylq0dyYC+Y1SadXLRdn144ti2h7fCq9/mXxCp/pkhY7oqW3+jcrerbZpxM4sv2kffnkjvQb@patchwork.amarulasolutions.com
X-Gm-Message-State: AOJu0YxbjWLnBkq+yh8vdXT9Pv1p9l/4cUmgETJ0nf/QMOMl7ZMu232V
+Y62WHBYUzdqASYnbakTq9v6IXk+mdfOO4NLjM1GcHVVc5IsIygw9UaKrBW0dMd4PbidQg==
X-Received: by 2002:a05:600c:c089:b0:485:3e00:944a with SMTP id
5b1f17b1804b1-48729109d76mr78225335e9.9.1774718223997;
Sat, 28 Mar 2026 10:17:03 -0700 (PDT)
X-BeenThere: linux-amarula@amarulasolutions.com;
h="AYAyTiJL12mux+7LAMjqiT34HM54hwGtsmaetJw5UquePhzdlw=="
Received: by 2002:a05:600c:3588:b0:486:fc97:e4ea with SMTP id
5b1f17b1804b1-487165661dcls17626735e9.1.-pod-prod-00-eu-canary; Sat, 28 Mar
2026 10:17:02 -0700 (PDT)
X-Received: by 2002:a05:600c:4e0b:b0:485:fbd2:f72 with SMTP id
5b1f17b1804b1-487290a9254mr95803595e9.1.1774718222114;
Sat, 28 Mar 2026 10:17:02 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1774718222; cv=none;
d=google.com; s=arc-20240605;
b=GnpV6xysoQdCfO1HIHvvYCF5uGCxTFcCna2xAmTyNa+IOJf17zcteEfXnqIvIj6oPe
8epw/6UjUfLetB3EpYE3bjRu37Pf5S9dkAXUXBdEv2/XvS/hW1hQaAfj9Fu38ybwpum8
SBI4CriwzOlWIFfFoaoQHAfhf1bMqblNXrzrDWf1TD+KT+kPRXsoEnh/MB3wKvj7FjC7
Cf050meO++4ZhQpQADI8rvrIW0AzxgbGepjfY4kqR3H0h93U0zON4wSwhn/vD+QeyY6u
vBx9srZiJL4C92E8d6GfKYyau1gzrWgECuAxRqmdWF1DSBPnsF0pBlOKc6cNPpewh8Mc
3bEQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:dkim-signature;
bh=3Mh8S4bvLscy0w5DE+eviu1WjsIbvjgnteN21kYD3wY=;
fh=7yTW57Uybo+1vU99Nd/eHhQQNnRmuZyDKIGdecKoeU8=;
b=Z09CwP1E56DGvLs/jfImRZrt3coFLslyU6MpEX1vSHtnaW5aOYVlVNp24de1dAxCw+
4bxMqT12l3zGcXJTgX1fb3CRh1SST/e5Gi/Qry4XZ/+okkKq1Imn5gMZsM7R63vDH/AH
+DmrfZ5QjOlTpIuyqKNK1u37byKVQWcUFL9mOcVbQb5Ai3A6aXqcxuWdVrY837UE+o7Z
QQzyEjXNDGcSZfBqldONc9qUocLjSX6lBoe3H/3bT/cl5q2leUbS7zf92fzDFL0mBQKh
snNBsbxzbfBBFF4bI8Y7HovGRkxeo5T0WNUOsVEnGzO8kYYVy7Wk7TAxRkElRDuWyFZ0
Xd+A==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b="SYv/TF38";
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@amarulasolutions.com
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com.
[209.85.220.41])
by mx.google.com with SMTPS id
5b1f17b1804b1-487306dd9c3sor2424925e9.9.2026.03.28.10.17.02
for <linux-amarula@amarulasolutions.com>
(Google Transport Security);
Sat, 28 Mar 2026 10:17:02 -0700 (PDT)
Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Gm-Gg: ATEYQzwvLImdhA5wULHD5d8N2tJFJGs3Og4+8uKuITaBpa8WLVZT19Ayn/X8gvSKmNt
VGrOV17I/J6uC2qPzo5NunNIRtsJLw0cT26WPrpy4lx2MJwts+VDLpU4B33T3H8fPjyjOymIoyB
3nhZHe5ihjLqp8ieyaspOVMaEV2fk3H8yjqDrzYw04zZvRUEW3JY/S9/x+fw6HfIgRdeWThN/CW
RKuoI7w+buwRJLLtqTJzJSfsJte56/D6k0Rt/eccy/E5FCTgH9UPnKG0ggl1zoF63uvKvEJ0HS1
akk3HG4Th0b1spSV/khM7KTN0sXg7Fkt3YM3Gts52hJlNpRNizzVFmVUvuOmawGKQRLgzUREDl/
u3wzMxSmy5AJbeZwk93RvzSbLD2hOlN1SNVPJhnj44Gyzz2JqX7SneAMSN1cCvyh3Qg5w/HW58K
7Pq2rxh8dSeUHmYOQboJH+7mXwgR06mf3lVo2D8nd+K2EbeqVI7JjbNEjQwifvi3AQKo2Ien6hi
rvwqmTGbYPTmaQNJfH48xSyvmcI50XoKW87ysVV+o2pji3VzPL8vAM2S0h83HuI18HcaFyPJjDv
SHeq3c/oltoREnnh80ANqgIpjOkr46cJRiE=
X-Received: by 2002:a05:600c:c172:b0:486:f893:56c6 with SMTP id
5b1f17b1804b1-48729109ac4mr90982165e9.10.1774718221665;
Sat, 28 Mar 2026 10:17:01 -0700 (PDT)
Received: from dario-ThinkPad-P14s-Gen-5.homenet.telecomitalia.it
(host-87-9-100-184.retail.telecomitalia.it. [87.9.100.184])
by smtp.gmail.com with ESMTPSA id
5b1f17b1804b1-48722c6b105sm332432465e9.1.2026.03.28.10.16.58
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sat, 28 Mar 2026 10:17:01 -0700 (PDT)
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: u-boot@lists.denx.de
Cc: linux-amarula@amarulasolutions.com,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Quentin Schulz <quentin.schulz@cherry.de>,
Rasmus Villemoes <ravi@prevas.dk>,
Tom Rini <trini@konsulko.com>
Subject: [PATCH 2/4] cmd: part: support lookup by UUID in 'part number'
Date: Sat, 28 Mar 2026 18:15:15 +0100
Message-ID: <20260328171624.2377527-3-dario.binacchi@amarulasolutions.com>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20260328171624.2377527-1-dario.binacchi@amarulasolutions.com>
References: <20260328171624.2377527-1-dario.binacchi@amarulasolutions.com>
MIME-Version: 1.0
X-Original-Sender: dario.binacchi@amarulasolutions.com
X-Original-Authentication-Results: mx.google.com; dkim=pass
header.i=@amarulasolutions.com header.s=google header.b="SYv/TF38";
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@amarulasolutions.com
Content-Type: text/plain; charset="UTF-8"
Precedence: list
Mailing-list: list linux-amarula@amarulasolutions.com;
contact linux-amarula+owners@amarulasolutions.com
List-ID: <linux-amarula.amarulasolutions.com>
X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com
X-Google-Group-Id: 476853432473
List-Post:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>,
<mailto:linux-amarula@amarulasolutions.com>
List-Help:
<https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>,
<mailto:linux-amarula+help@amarulasolutions.com>
List-Archive:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/>
List-Unsubscribe:
<mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>,
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe>
|
| Series |
|
| Related |
show
|
diff --git a/cmd/part.c b/cmd/part.c index 975a0a08a99d..a3f3febb6977 100644 --- a/cmd/part.c +++ b/cmd/part.c @@ -139,6 +139,10 @@ static int do_part_info(int argc, char *const argv[], enum cmd_part_info param) err = part_get_info(desc, part, &info); if (err) return 1; + } else if (uuid_str_valid(argv[2])) { + part = part_get_info_by_uuid(desc, argv[2], &info); + if (part < 0) + return 1; } else { part = part_get_info_by_name(desc, argv[2], &info); if (part < 0) @@ -314,8 +318,8 @@ U_BOOT_CMD( " - set environment variable to the size of the partition (in blocks)\n" " part can be either partition number or partition name\n" "part number <interface> <dev> <part> <varname>\n" - " - set environment variable to the partition number using the partition name\n" - " part must be specified as partition name\n" + " - set environment variable to the partition number using the partition UUID or name\n" + " part must be specified as partition UUID or name\n" "part name <interface> <dev> <part> <varname>\n" " - set environment variable to the partition name using the partition number\n" " part must be specified as partition number\n"
The 'part number' command currently allows looking up a partition index only by its name. Extend the command to support looking up the partition index via its partition UUID. Unlike names, UUIDs guarantee unique partition identification, avoiding ambiguity. The logic is updated to check if the provided string is a valid UUID before falling back to a name-based search. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> --- cmd/part.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)