From patchwork Fri Mar 30 08:28:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume GARDET X-Patchwork-Id: 893180 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40CFBf0WDyz9s1S for ; Fri, 30 Mar 2018 19:28:40 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id DA563C221BD; Fri, 30 Mar 2018 08:28:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id DA652C21E73; Fri, 30 Mar 2018 08:28:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 883C2C21E73; Fri, 30 Mar 2018 08:28:32 +0000 (UTC) Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [212.27.42.2]) by lists.denx.de (Postfix) with ESMTPS id 2E3CFC21DFA for ; Fri, 30 Mar 2018 08:28:32 +0000 (UTC) Received: from localhost.localdomain (unknown [82.244.147.214]) by smtp2-g21.free.fr (Postfix) with ESMTP id 54B7D200382; Fri, 30 Mar 2018 10:28:31 +0200 (CEST) From: Guillaume GARDET To: u-boot@lists.denx.de Date: Fri, 30 Mar 2018 10:28:19 +0200 Message-Id: <20180330082819.11100-1-guillaume.gardet@free.fr> X-Mailer: git-send-email 2.13.6 Cc: Tom Rini , Guillaume GARDET Subject: [U-Boot] [PATCH] mkimage: do not fail if there is no print_header function X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Commit 253c60a breaks the exit value of 'mkimage -T rkimage' and print the following error: mkimage: Can't print header for Rockchip Boot Image support: Success It is not a failure to not print headers, so just display the warning message, and finish the function properly. Signed-off-by: Guillaume GARDET Cc: Philipp Tomsich Cc: Simon Glass Cc: Tom Rini Reviewed-by: Philipp Tomsich --- tools/mkimage.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/mkimage.c b/tools/mkimage.c index 28ff35e670..4e561820e7 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -588,9 +588,8 @@ int main(int argc, char **argv) if (tparams->print_header) tparams->print_header (ptr); else { - fprintf (stderr, "%s: Can't print header for %s: %s\n", - params.cmdname, tparams->name, strerror(errno)); - exit (EXIT_FAILURE); + fprintf (stderr, "%s: Can't print header for %s\n", + params.cmdname, tparams->name); } (void) munmap((void *)ptr, sbuf.st_size);