From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 27 Jan 2026 13:14:18 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vkhxa-005tMw-2V for lore@lore.pengutronix.de; Tue, 27 Jan 2026 13:14:18 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vkhxY-0001JF-6F; Tue, 27 Jan 2026 13:14:16 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vkhxV-0001Gb-SJ for oss-tools@pengutronix.de; Tue, 27 Jan 2026 13:14:13 +0100 Received: from dude06.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::5c]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vkhxW-002k9j-13 for oss-tools@pengutronix.de; Tue, 27 Jan 2026 13:14:13 +0100 Received: from ejo by dude06.red.stw.pengutronix.de with local (Exim 4.98.2) (envelope-from ) id 1vkhxV-0000000Eny3-2W03 for oss-tools@pengutronix.de; Tue, 27 Jan 2026 13:14:13 +0100 From: =?UTF-8?q?Enrico=20J=C3=B6rns?= To: oss-tools@pengutronix.de Date: Tue, 27 Jan 2026 13:13:01 +0100 Message-ID: <20260127121322.3332573-5-ejo@pengutronix.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260127121322.3332573-1-ejo@pengutronix.de> References: <20260127121322.3332573-1-ejo@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [OSS-Tools] [PATCH dt-utils 5/5] libdt: print error for failed udev_new() for consistency 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: , 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.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false All other calls of udev_new() in libdt.c print this error string, thus print it here, too. Signed-off-by: Enrico Jörns --- src/libdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libdt.c b/src/libdt.c index f51ed17..cecdb41 100644 --- a/src/libdt.c +++ b/src/libdt.c @@ -2823,8 +2823,10 @@ struct cdev *cdev_find_child_by_gpt_typeuuid(struct cdev *cdev, guid_t *typeuuid } udev = udev_new(); - if (!udev) + if (!udev) { + fprintf(stderr, "Can't create udev\n"); return ERR_PTR(-ENOMEM); + } parent = udev_from_devpath(udev, cdev->devpath); if (!parent) -- 2.47.3