From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 14 Apr 2022 12:17:16 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1newXN-001YwX-QX for lore@lore.pengutronix.de; Thu, 14 Apr 2022 12:17:16 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1newXK-0007Ay-PP; Thu, 14 Apr 2022 12:17:14 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1newXH-0007Am-HN; Thu, 14 Apr 2022 12:17:11 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1newXI-002xYq-8u; Thu, 14 Apr 2022 12:17:10 +0200 Received: from mol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1newXG-00EcUb-0Y; Thu, 14 Apr 2022 12:17:10 +0200 From: Michael Olbrich To: oss-tools@pengutronix.de Date: Thu, 14 Apr 2022 12:17:05 +0200 Message-Id: <20220414101705.3468038-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220207164718.1835141-3-m.olbrich@pengutronix.de> References: <20220207164718.1835141-3-m.olbrich@pengutronix.de> MIME-Version: 1.0 Subject: [OSS-Tools] [PATCH] fixup! libdt: add support for barebox, storage-by-uuid X-BeenThere: oss-tools@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: Pengutronix Public Open-Source-Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Olbrich Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "OSS-Tools" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: oss-tools-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false --- >>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