From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 27 Jan 2026 13:14:26 +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 1vkhxi-005tNw-1v for lore@lore.pengutronix.de; Tue, 27 Jan 2026 13:14:26 +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-0001IN-22; 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-0001GZ-Rb 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-002k9i-0z 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-0000000Enxz-2S8b 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:00 +0100 Message-ID: <20260127121322.3332573-4-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 4/5] libdt: print error if device is not GPT-partitioned 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 This might really help debugging. Since we cannot differentiate between not detecting the type properly and detecting it is not GPT, use a wording that indicates this. 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 1bef154..f51ed17 100644 --- a/src/libdt.c +++ b/src/libdt.c @@ -2817,8 +2817,10 @@ struct cdev *cdev_find_child_by_gpt_typeuuid(struct cdev *cdev, guid_t *typeuuid int ret; - if (!cdev->is_gpt_partitioned) + if (!cdev->is_gpt_partitioned) { + fprintf(stderr, "%s is not detected as GPT-partitioned\n", cdev->devpath); return ERR_PTR(-EINVAL); + } udev = udev_new(); if (!udev) -- 2.47.3