Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B009D59D78 for ; Fri, 12 Dec 2025 16:24:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 922908367F; Fri, 12 Dec 2025 17:23:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.b="YDNzQLIK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 58487839B7; Fri, 12 Dec 2025 17:23:55 +0100 (CET) Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7A4008367F for ; Fri, 12 Dec 2025 17:23:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kory.maincent@bootlin.com Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 032E6C19362; Fri, 12 Dec 2025 16:23:27 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 1A891606DF; Fri, 12 Dec 2025 16:23:51 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 7FF27103C8E03; Fri, 12 Dec 2025 17:23:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765556629; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=keBGrGoLQ1oZdEi83j8RcWAFSXWUXrkBmAykWO+af3w=; b=YDNzQLIKlw8SVQrOaVNpep7ak1g7m+DfXjdc5kNmPHnXa7yWqYTlLovT5TT+PS52m3H7zv Yvt4iYD3bxgc//qqxSc6vA209dwlIZVdWg1BaunJrSdi25gn1dWu/AFA/g0ReIUxVufTYF bpPOxglINqsz/urSMISx+8LwDCr1lzLSQoKqPrJlSz+F9uN62WlWFOfihOVOG5H6YeoiAO VyCP94ZInYAQU2MnVyBDmy8Il3EDhDx6Lw3U+arILIRUUPSWK9SLhiWlW8AYQ/Ax8UqBVi cYsfkywppEDnhAxExMfzYVwfCZOQEDJ8zg3m3MYhW9IL0IsexzMX/Jbiy0g/2w== From: Kory Maincent Date: Fri, 12 Dec 2025 17:23:28 +0100 Subject: [PATCH v2 3/6] tools: mkfwumdata: Improve error message specificity MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20251212-feature_fwumdata-v2-3-ad51572fbe79@bootlin.com> References: <20251212-feature_fwumdata-v2-0-ad51572fbe79@bootlin.com> In-Reply-To: <20251212-feature_fwumdata-v2-0-ad51572fbe79@bootlin.com> To: u-boot@lists.denx.de Cc: Thomas Petazzoni , Tom Rini , Patrice Chotard , Paul HENRYS , Sughosh Ganu , Greg Malysa , Arturs Artamonovs , Vasileios Bimpikas , Utsav Agarwal , Nathan Barrett-Morrison , Peng Fan , Simon Glass , Jerome Forissier , =?utf-8?q?Duje_Mihanovi=C4=87?= , Stefan Roese , Mattijs Korpershoek , Sumit Garg , Heiko Schocher , Alif Zakuan Yuslaimi , E Shattow , Raymond Mao , Jan Kiszka , Shiji Yang , Daniel Golle , Heinrich Schuchardt , Ilias Apalodimas , Yao Zi , Leonard Anderweit , Kory Maincent X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Replace the generic error message with a more informative one. This helps users quickly understand the correct command-line argument format when the tool reports an error. Signed-off-by: Kory Maincent --- tools/fwumdata_src/mkfwumdata.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/fwumdata_src/mkfwumdata.c b/tools/fwumdata_src/mkfwumdata.c index fbc2067bc12..5ceec7a2980 100644 --- a/tools/fwumdata_src/mkfwumdata.c +++ b/tools/fwumdata_src/mkfwumdata.c @@ -473,7 +473,9 @@ int main(int argc, char *argv[]) /* This command takes UUIDs * images and output file. */ if (optind + images + 1 != argc) { - fprintf(stderr, "Error: UUID list or output file is not specified or too much.\n"); + fprintf(stderr, + "Error: Expected %ld UUID string(s) and 1 output file, got %d argument(s).\n", + images, argc - optind); print_usage(); return -ERANGE; } -- 2.43.0