From patchwork Fri Apr 22 23:59:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominique Martinet X-Patchwork-Id: 1621283 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=jnp8pzOu; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::c37; helo=mail-oo1-xc37.google.com; envelope-from=swupdate+bncbcwivbv7sugrb7ucrwjqmgqehg2zt3a@googlegroups.com; receiver=) Received: from mail-oo1-xc37.google.com (mail-oo1-xc37.google.com [IPv6:2607:f8b0:4864:20::c37]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KlWcK30R4z9s75 for ; Sat, 23 Apr 2022 10:00:00 +1000 (AEST) Received: by mail-oo1-xc37.google.com with SMTP id k13-20020a4ad10d000000b003531756b915sf3631459oor.4 for ; Fri, 22 Apr 2022 17:00:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650671998; cv=pass; d=google.com; s=arc-20160816; b=jQXjbeIBECzxXNarqSxhAVL9Pufe8g4Ky0jcz1KesWSxBT8DqDQNAEPX03FT4m9STI W74G5UmjMDDCrUZzuBkkVjKAxIPlKUyT4iZl0rG3bl8eRPcDuUvUgKhMr2zTtCR04hDD X4ZHXXIsBbZo/j85A2GXMwyDjyGiS2DalBCUTvRdfgMG0jd1T1qQgLrC7ijWBZXul/ZG wdxRTfXT3VRKH/huknerSbl6UoJAQoZ/Gyc/E8aX7Rbwjr0CUVZNwCWHmiVXpPnMoK4O JMq+gi7Bxno7cedHw9rRdJ7Ifuvjq5sR55oDGE/53P+QP8X5QrmdVJoMv81+X5MKlcO2 3F3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=VVs8YPeg6aPhnHhlgCsNe/rhyZWg5pqrPFjQpe9OJGc=; b=BPGcyWw1zUytDPtOwwzurILG0EvRfekKvF9TBGX8rJjxpKbXELPDScvnYcNrMpwMhk P2u1VCN75ZLWB70zIokLqnQI3L2GPpZGlH1UN2ec6sTGrZVbQycbrCK94eFLPqUqCrU3 LOEG0SlM8d1Ezdm3CXGeHi+N/ZZTJ+Da8p2YPso03W37WlAjJCsahkGXLQ2R71GmwWMo uoO9kc75EUtAlfNlq/4WGkWSYjMTkBAGWUbBkZ6Ayd7RBInJAReUQ60iIkJ9NToDttac 4ohcbhy8H1zmCYVTGRxptKhZ7SSX5ioa/fESNqYen46EejmBztCvhcWb0k6n/o2TY4B2 8BcQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=VVs8YPeg6aPhnHhlgCsNe/rhyZWg5pqrPFjQpe9OJGc=; b=jnp8pzOuBSiJsYKGMSS4ibI8ToFkRniICZTqWi+oDVAOgDTopP2Pd1jp4uZx51Loxs c/+3N92cAkvHenjoutf9yqy77272S8FeRo3cWRCXIiaD1aYT2pCnqqNR3BoAg4/XQxeL eZJDh8b8aP9Kfs3qa1cTyIR0BMPS0rhsywuD4Q1DnTDoeCGR4Gr5Fz/EqrVgIYKeNGov OO8MZLipR1wu6M8Drjx9DCbyZwRVHixM++Dp9HrHvlwKeKAzlW/9bsH6M2M++p5rOjdH R+bC9P3GBs+qd04CU5dDmUXdZS7Y7vNYef899to7bpyHnSFjHVeQ/tnF7n/1fGl1ylPh qvoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=VVs8YPeg6aPhnHhlgCsNe/rhyZWg5pqrPFjQpe9OJGc=; b=L0SEr0Ipr5TXR3c4syBR4uBQqyJIckvE18Ox9Yxy/SCfqJI/+uFTXIE1aCJZweW1ZI sYFVHDX/nRo8iaCFATr8l92JyYiXu+cfrvauqL7RWaDpBH2+XNkj6s64/fYyN+h3YfbQ 6ziqx+TR2CyDAc4uiJTIOpv8iuDNiROzngJaTzZpE5FJHLUrwJfscDnGb8bO8TPt85UU 9t5yVOtAexPbSvbAU5kxTWIdPMvw4CYdZmaJ5/xeFN52i2vC0IYFiNgLaf875xe3+B6J oCX+TpcBxqJiTBqnwdEIgfOaZhkoRwliOjfmwmBunwvNe7J1t5x9oohBYEZwDYBbYhQy vCiw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM5333TWspM6ejGFO6tMPMmNhY6mSzRWYohzC/9Bl8oPIS+wpB5Lt9 HlXi+lXLiQShAu8LKV/pg/U= X-Google-Smtp-Source: ABdhPJygeh1niRnJ6ETikUxl/rltaU8pPsMlTAGsgnyCKTcQf05Qy5CmRqmAA7lnMRlMs2JM9f1fTg== X-Received: by 2002:a05:6870:4201:b0:e6:47c4:e104 with SMTP id u1-20020a056870420100b000e647c4e104mr6804012oac.257.1650671998269; Fri, 22 Apr 2022 16:59:58 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6870:d296:b0:e2:fa0:dca4 with SMTP id d22-20020a056870d29600b000e20fa0dca4ls764597oae.6.gmail; Fri, 22 Apr 2022 16:59:57 -0700 (PDT) X-Received: by 2002:a05:6870:a985:b0:dd:fb7f:8e3f with SMTP id ep5-20020a056870a98500b000ddfb7f8e3fmr3160942oab.267.1650671997897; Fri, 22 Apr 2022 16:59:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650671997; cv=none; d=google.com; s=arc-20160816; b=auUt1xmPwf5uUzXO2ntwCXm5dfL5cPTvN2ELBS2BlwHhd8vHglfzkkIfaDFfD5rvNW FjS8kRF1iqQf3AYmvE68PusOvbS3J8J+gqz32uAXz4W1W2+5+r7lFqroGNLOQaEAMmk2 i4O5md7Tt6VU6e7t0lAQT5XdpRnCuCI+OryzMiuQueYdyLLpGf53N+egMhOifAGoRm4O SjgUy2tD/256RjkzN1DTxApEwkCRKMz65sMnWUGfw7Y4tTqkxCUFp/i4EijKJ+ba4+Py Hg1mG81Bv6r6ENcGN0aCkxH8S710WA4shaDmP4zc7SGPA9vJfLnwasiq0LUlkdmiVeP/ buzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=AvxSIDnbOY/TKDM48UkU/uSzdxq62qLu/JPMVRTUEiU=; b=ZafWd2lEircf1sG+bADimGdKaMUhfLRCRhGj+vK+9oeXKDg3leivBCVClDE2BbUgQh Yxm7pVRiPOhvKA6153df9mMwRX9CcLNwccF+29IzRxNMgdPrQML3e87bc73jvK2oNV7Q 6ZFeSVmLGIthRonoTQp9fDZWm2cy/58ITpYg8sE2YPuJ2/Bpq1S+jWFNFy+Dt9pz4eUd vVKhx5HPyJsgNPgPcPm9ThSMwEeNVV4JAiWr5kI7Zx1SoO/KZWO2sxMBJ8bjh6DQOKSO smcV7q4mbj5zTESS06ZcVDGnBGDLBcs3h6z8M00TrXI+ppKY/IJtC/R3uzr8sCe2uoRB CXcA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Received: from gw2.atmark-techno.com (gw2.atmark-techno.com. [35.74.137.57]) by gmr-mx.google.com with ESMTP id c22-20020a056808139600b0032235b7f6aasi1215881oiw.4.2022.04.22.16.59.57 for ; Fri, 22 Apr 2022 16:59:57 -0700 (PDT) Received-SPF: pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) client-ip=35.74.137.57; Received: from gw2.atmark-techno.com (localhost [127.0.0.1]) by gw2.atmark-techno.com (Postfix) with ESMTP id 7A38D20D60 for ; Sat, 23 Apr 2022 08:59:56 +0900 (JST) Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by gw2.atmark-techno.com (Postfix) with ESMTPS id 5ED4520D60 for ; Sat, 23 Apr 2022 08:59:56 +0900 (JST) Received: by mail-pf1-f198.google.com with SMTP id j8-20020aa78d08000000b0050ade744b37so4258400pfe.16 for ; Fri, 22 Apr 2022 16:59:56 -0700 (PDT) X-Received: by 2002:a63:1215:0:b0:39c:fa33:9427 with SMTP id h21-20020a631215000000b0039cfa339427mr5984673pgl.296.1650671995341; Fri, 22 Apr 2022 16:59:55 -0700 (PDT) X-Received: by 2002:a63:1215:0:b0:39c:fa33:9427 with SMTP id h21-20020a631215000000b0039cfa339427mr5984664pgl.296.1650671995118; Fri, 22 Apr 2022 16:59:55 -0700 (PDT) Received: from pc-0115 (103.131.189.35.bc.googleusercontent.com. [35.189.131.103]) by smtp.gmail.com with ESMTPSA id g15-20020aa7818f000000b00505ce2e4640sm3531217pfi.100.2022.04.22.16.59.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Apr 2022 16:59:53 -0700 (PDT) Received: from martinet by pc-0115 with local (Exim 4.95) (envelope-from ) id 1ni3Bm-00BmZK-79; Sat, 23 Apr 2022 08:59:50 +0900 From: Dominique Martinet To: swupdate@googlegroups.com, sbabic@denx.de Cc: Dominique Martinet Subject: [swupdate] [PATCH 3/6] start_download: return EXIT_FAILURE instead of result on failures Date: Sat, 23 Apr 2022 08:59:41 +0900 Message-Id: <20220422235944.2808227-3-dominique.martinet@atmark-techno.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220422235944.2808227-1-dominique.martinet@atmark-techno.com> References: <20220422235944.2808227-1-dominique.martinet@atmark-techno.com> MIME-Version: 1.0 X-Original-Sender: dominique.martinet@atmark-techno.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , using the swupdate status from last update is not consistent with what other modes (at least swupdate -i / swupdate-client) return, and might miss weird conditions where result is IDLE for some reason that would be success (0 value) return EXIT_FAILURE like the others Signed-off-by: Dominique Martinet Reviewed-by: Stefano babic --- This only makes sense if previous patch is applied, and doesn't matter if it's not as that exit status is currently lost corelib/downloader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corelib/downloader.c b/corelib/downloader.c index 0debad0b7486..6bff9c7f2b82 100644 --- a/corelib/downloader.c +++ b/corelib/downloader.c @@ -163,5 +163,5 @@ int start_download(const char *fname, int argc, char *argv[]) free(channel_options.auth); } - exit(result == SUCCESS ? EXIT_SUCCESS : result); + exit(result == SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE); }