From: Michael Olbrich <m.olbrich@pengutronix.de>
To: oss-tools@pengutronix.de
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [OSS-Tools] [PATCH] fixup! libdt: add support for barebox, storage-by-uuid
Date: Thu, 14 Apr 2022 12:17:05 +0200 [thread overview]
Message-ID: <20220414101705.3468038-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20220207164718.1835141-3-m.olbrich@pengutronix.de>
---
>From what I can tell, the patches are still in next, so can you please
squash this fixup? This only worked by accident because the first block
device was the correct one :-/.
Michael
src/libdt.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/libdt.c b/src/libdt.c
index 2e0247e2cab3..2ae3ace4732e 100644
--- a/src/libdt.c
+++ b/src/libdt.c
@@ -2379,7 +2379,7 @@ static struct udev_device *of_find_device_by_uuid(const char *uuid)
udev_enumerate_scan_devices(enumerate);
devices = udev_enumerate_get_list_entry(enumerate);
udev_list_entry_foreach(dev_list_entry, devices) {
- const char *path, *devtype, *outpath, *uuid;
+ const char *path, *devtype, *outpath, *dev_uuid;
struct udev_device *device;
path = udev_list_entry_get_name(dev_list_entry);
@@ -2390,14 +2390,14 @@ static struct udev_device *of_find_device_by_uuid(const char *uuid)
if (!devtype)
continue;
if (!strcmp(devtype, "disk")) {
- uuid = udev_device_get_property_value(device, "ID_PART_TABLE_UUID");
- if (!strcmp(uuid, uuid)) {
+ dev_uuid = udev_device_get_property_value(device, "ID_PART_TABLE_UUID");
+ if (!strcmp(dev_uuid, uuid)) {
outpath = udev_device_get_devnode(device);
return device;
}
} else if (!strcmp(devtype, "partition")) {
- uuid = udev_device_get_property_value(device, "ID_PART_ENTRY_UUID");
- if (!strcmp(uuid, uuid)) {
+ dev_uuid = udev_device_get_property_value(device, "ID_PART_ENTRY_UUID");
+ if (!strcmp(dev_uuid, uuid)) {
outpath = udev_device_get_devnode(device);
return device;
}
--
2.30.2
_______________________________________________
OSS-Tools mailing list
OSS-Tools@pengutronix.de
next prev parent reply other threads:[~2022-04-14 10:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 16:47 [OSS-Tools] [PATCH v2 0/3] improve barebox-state support on EFI system Michael Olbrich
2022-02-07 16:47 ` [OSS-Tools] [PATCH v2 1/3] libdt: only requires a partname for mtd Michael Olbrich
2022-02-07 16:47 ` [OSS-Tools] [PATCH v2 2/3] libdt: add support for barebox, storage-by-uuid Michael Olbrich
2022-04-14 10:17 ` Michael Olbrich [this message]
2022-02-07 16:47 ` [OSS-Tools] [PATCH v2 3/3] state: automatically find state.dtb in the ESP Michael Olbrich
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=20220414101705.3468038-1-m.olbrich@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=oss-tools@pengutronix.de \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox