All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] cdev-alias: support referencing diskuuid without child partition
@ 2025-12-11 21:00 Ahmad Fatoum
  2025-12-11 21:00 ` [PATCH 2/5] cdev-alias: fix memory leak in diskuuid handling Ahmad Fatoum
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2025-12-11 21:00 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

This is already the case with other cdev aliases, so support this for
symmetry.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 common/cdev-alias.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/common/cdev-alias.c b/common/cdev-alias.c
index e5a059ad7f4d..1878553615d2 100644
--- a/common/cdev-alias.c
+++ b/common/cdev-alias.c
@@ -57,9 +57,11 @@ static int cdev_alias_resolve_diskuuid(struct cdev_alias_res *cdev_alias_res,
 		if (strcasecmp(cdev->diskuuid, uuid))
 			continue;
 
-		cdev = cdev_find_partition(cdev, arg);
-		if (!cdev)
-			return -ENODEV;
+		if (arg) {
+			cdev = cdev_find_partition(cdev, arg);
+			if (!cdev)
+				return -ENODEV;
+		}
 
 		return fn(cdev, data);
 	}
-- 
2.47.3




^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-12-12  8:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-11 21:00 [PATCH 1/5] cdev-alias: support referencing diskuuid without child partition Ahmad Fatoum
2025-12-11 21:00 ` [PATCH 2/5] cdev-alias: fix memory leak in diskuuid handling Ahmad Fatoum
2025-12-11 21:00 ` [PATCH 3/5] cdev-alias: add support for storage{.removable,.builtin} Ahmad Fatoum
2025-12-12  8:32   ` Sascha Hauer
2025-12-11 21:00 ` [PATCH 4/5] boot: try builtin and removable media before net for boot.default Ahmad Fatoum
2025-12-11 21:00 ` [PATCH 5/5] boot: assign names to bootentry providers Ahmad Fatoum
2025-12-12  8:36 ` [PATCH 1/5] cdev-alias: support referencing diskuuid without child partition Sascha Hauer

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.