Message ID | 20210724150714.567177-3-festevam@gmail.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBDULZYNR2QMRBMOZ6CDQMGQEWNCPNNY@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::b3e; helo=mail-yb1-xb3e.google.com; envelope-from=swupdate+bncbdulzynr2qmrbmoz6cdqmgqewncpnny@googlegroups.com; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=SUFDeIWV; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=m6jymZzD; dkim-atps=neutral Received: from mail-yb1-xb3e.google.com (mail-yb1-xb3e.google.com [IPv6:2607:f8b0:4864:20::b3e]) (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 ozlabs.org (Postfix) with ESMTPS id 4GX8gR4XQvz9sX1 for <incoming@patchwork.ozlabs.org>; Sun, 25 Jul 2021 01:07:31 +1000 (AEST) Received: by mail-yb1-xb3e.google.com with SMTP id a188-20020a25cac50000b029055d47682463sf6650002ybg.5 for <incoming@patchwork.ozlabs.org>; Sat, 24 Jul 2021 08:07:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1627139249; cv=pass; d=google.com; s=arc-20160816; b=FWCiu1Mf8apogNEQxQkn6mNzV9OqpmeWwZrRgVarGzGrpX8ZJobv2hd/+TL2iYfb8p HNpQ0VFjn6LaknKXVeXgXUo72SF8jySPPqAb1G2bPYCyQcQ/3vFAE+BEDW/r9Clfb41u SP4mey5OnBktOJ0EVCNopaQSwiFnJlcDU+zlDp28DD5TKsFVT+LnYs6P6TRbphXVYX2/ akb8BAiZcfpygI+InT9yykcCmLqcTtQQ50+EHv7JH8AMLcxk/+4/JfMSGLX/eTrjGw2L x3jFV9wEcQYQrrwVg/DKFBZvwPi9A1FvVfzsNuZRTLBkHfjNG3nBwzTThvuf3H1GRfoD 1oaQ== 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 :dkim-signature; bh=FqLtl1P6qR2w/+JlNzbmcDr2i0r204PmAMnO6ed0UUc=; b=zJ2QVpHWqcKWswX2SVmTR86kS2RZhOkIvyUOBujT2FVVbJxGzEolBMNEj7jZTGC/z1 mDbRy0SoLqXpbQw5Qwx26mnyTHgm7S4Mkm11LRXRxosjROY++FEYpeH/3OAyaZp9qodc mHjTfHyot2ixdWbQHJfwBdrmzqdnWbfetOiCmXSqrc0Z4XKYBwFCwjO/qhYiBj8MfLuC v43Gh1nGuFlvis9Zr0GQWodWGDcPfyoVQMGC62wA4HiOwyQF8XjzujWVpW6gUhdfnZlo XPhyGuj6NZRECdqHIdCB05YIXsp5e6CKmXb7Bf+3mx21PELbmtFCifui4BpQIbM9ltEj I0xQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iUA5cNCt; spf=pass (google.com: domain of festevam@gmail.com designates 2607:f8b0:4864:20::1029 as permitted sender) smtp.mailfrom=festevam@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=FqLtl1P6qR2w/+JlNzbmcDr2i0r204PmAMnO6ed0UUc=; b=SUFDeIWVDezBz2e3hx/BKrh67XlZ6wE7JU8Rnfc+sNfB3d32vfdBZmDrTKzexkma2z cSUoTGQF7Ki4QOoWpox315GbfCjy7a+p9QgW5lkpF/6i95COoLnekmNnOnZrnMz8r7Pq CyHnvLrxkmQNRSFtZHxnv+gt8rSZIsGWef3FsyHsqYYtzQZsrP0YSkXlVmCRntjzgzRa QIU8t60YGOyPZmNG5yZ9bHQd2fBle/JLY6VL0OwXku9lvr3FdliiOg1x6kMFXIPGm8BK OpRSjmoZziOHMk4TWJlgtgSAljl7FExgRSYEiw7xEJIGvQ//vIsbspRMZaJckaHYoY0y yCiQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=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=FqLtl1P6qR2w/+JlNzbmcDr2i0r204PmAMnO6ed0UUc=; b=m6jymZzDW7g1QkKNjZSXIB0jx1Vow5Cl/cLTn3UQb96b9RrBTpIZUiRktFa4dbVJ0G p9/h0DmTQQRRmECtAQ0kl9Lyby/QJq6oV3N4UzxbESjE2vO/RUYaWENeAR08VaDfFC6S uZAyLbPlyqoSu/B76VlbwBWr5nkRxUt6LWnOFXI+mBfQsA6aQrFhJdKnJokJ3hfnKjNU ALmGG6kGi9S4O9+E1htwJTOUkg0aOqOp/Dg3fgK3VgkAF5HnM2UgLeSGJHZzE8pE1i3o FVzuuHHY/T/Di3HSZmNyp3F3MGN7MDQLvv/S36GOVhko2rLh+A5OSIZc4GvOgOCcWh/b /oiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=FqLtl1P6qR2w/+JlNzbmcDr2i0r204PmAMnO6ed0UUc=; b=k4yyahdZDalfBOo7ifhGxGfmMNZJS92HUrFR6FkF1zzdVS/IILRXkkrYF1phgTO9wX /yaagOmtycY67vOdOha6L3dlGnspPrWfUxJtSVA9/uxqb75idyO1evXUvERH6b4ZLDde zqebwK4V6nE90s2Ww19W8afldDCOQhrPtpimJey9F2FDXrTxDrmubWXncgHxQYiPdtIu JLKxg6VU+qaXXvjHBpjNk4fPCudBf/lCEg/4w6uqf5gIU56WmwIFTEbIW3HVwAXRLF3J 7XEGz6ArxHnFS41pERqCMGJtl+mF8ZjoFrjtcZjox3pnAemtLJOsiuA8/XavR5NJbcHI s2Xg== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM5314d7SfJM7cJeUkdo9Y9Ru2yleaGD9V0Fa6WKK/SnyZbISb090D nglYS6ivdApUqLjpLJT2xbE= X-Google-Smtp-Source: ABdhPJxwM5PvMi7b2m5VMQkykE2qvG4KJQR8nfYXYdPNl3eE7NG+tSYZPoyclNxQmr/AZsMh5u37Mg== X-Received: by 2002:a25:244:: with SMTP id 65mr9570196ybc.297.1627139249240; Sat, 24 Jul 2021 08:07:29 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a25:a4c7:: with SMTP id g65ls482649ybi.8.gmail; Sat, 24 Jul 2021 08:07:28 -0700 (PDT) X-Received: by 2002:a25:abf3:: with SMTP id v106mr13547886ybi.299.1627139248854; Sat, 24 Jul 2021 08:07:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627139248; cv=none; d=google.com; s=arc-20160816; b=gk3ky3CDgdmwnU8k5MV8zax/4YrqoxQ0b4SyaNr29FZpXlzDL3XncZSMdBOmKAPtpw sdkbmdLhtM2nU/HLTLiIo+cDc4Es92Efzjf55ndKVzucHZHs7+VBPMcSFZLKMZy7dw5Z Q2C1wxEDAgrBI+D8RRHOgUdN8x54fucxFsMqQSVmhFBdcV/XEyI35Z069qzx9NXwgcIB 4u0YKJZYoOSJX9huIyHqnK7xRiMOjZXj49+mj8QHH4ci1efzihrIdYBTiUoPlHg2gJGd Io8pj+Cf1bHCe5pZ+7L1DeiPMIZVg3jqF5YLbwj/Hq9+OfuqUFW+JuqyKMaEv6xFTqmQ M3IA== 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:dkim-signature; bh=3mPjBH+F+DlXpR4oFAOQ3jnSrCAMygOJTimvUvyWQYE=; b=HCCxPAmpApOKM49FIa1EQ67XkSdUaH+PPaipOnlyySNF/No61Vk8Vb/FLqSMTLQ9B2 eewvYHUxYfuIPiYU2S4uPx9BaRXZBS1X2jghPw3HcU3mTgq9vRlEum4BcfXMejUInk5F jffFOfmr8IaGIvIbb6Wqdb5+L8yuZ3prXad2jVSjp+9pQwJGz2ZQi9CLVCknma437ucP HwfK3gCo9KUA6W3Y3hHVDYcyT+X30lHjTEXFlcn74Dk7a9Qz+5cjMxlMgGbnr24FG+PP 1HpdKmIuiROcAbqV+Vg1bme4MBrOAiWQFTpL9Suje1bCS1uwWicAW3KZRC+z3Jr74viO AZyA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iUA5cNCt; spf=pass (google.com: domain of festevam@gmail.com designates 2607:f8b0:4864:20::1029 as permitted sender) smtp.mailfrom=festevam@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com. [2607:f8b0:4864:20::1029]) by gmr-mx.google.com with ESMTPS id r3si4507957ybc.1.2021.07.24.08.07.28 for <swupdate@googlegroups.com> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 24 Jul 2021 08:07:28 -0700 (PDT) Received-SPF: pass (google.com: domain of festevam@gmail.com designates 2607:f8b0:4864:20::1029 as permitted sender) client-ip=2607:f8b0:4864:20::1029; Received: by mail-pj1-x1029.google.com with SMTP id m1so6475929pjv.2 for <swupdate@googlegroups.com>; Sat, 24 Jul 2021 08:07:28 -0700 (PDT) X-Received: by 2002:aa7:8b07:0:b029:2f7:d38e:ff1 with SMTP id f7-20020aa78b070000b02902f7d38e0ff1mr9696491pfd.72.1627139248192; Sat, 24 Jul 2021 08:07:28 -0700 (PDT) Received: from localhost.localdomain ([2804:431:d77f:26f1:1bce:1fc6:1476:4c5f]) by smtp.gmail.com with ESMTPSA id u16sm41783477pgh.53.2021.07.24.08.07.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Jul 2021 08:07:27 -0700 (PDT) From: Fabio Estevam <festevam@gmail.com> To: swupdate@googlegroups.com Cc: sbabic@denx.de, Fabio Estevam <festevam@gmail.com> Subject: [swupdate] [PATCH 3/3] raw_handler: Check for openfileoutput() failure Date: Sat, 24 Jul 2021 12:07:14 -0300 Message-Id: <20210724150714.567177-3-festevam@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210724150714.567177-1-festevam@gmail.com> References: <20210724150714.567177-1-festevam@gmail.com> MIME-Version: 1.0 X-Original-Sender: festevam@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iUA5cNCt; spf=pass (google.com: domain of festevam@gmail.com designates 2607:f8b0:4864:20::1029 as permitted sender) smtp.mailfrom=festevam@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
None
|
expand
|
diff --git a/handlers/raw_handler.c b/handlers/raw_handler.c index 293af7b8140e..7ce95a6b5776 100644 --- a/handlers/raw_handler.c +++ b/handlers/raw_handler.c @@ -253,6 +253,8 @@ static int install_raw_file(struct img_type *img, } fdout = openfileoutput(path); + if (fdout < 0) + return fdout; if (!img_check_free_space(img, fdout)) { return -ENOSPC; }
openfileoutput() may fail, so check its return value and propagate it in the case of failure. Signed-off-by: Fabio Estevam <festevam@gmail.com> --- handlers/raw_handler.c | 2 ++ 1 file changed, 2 insertions(+)