From patchwork Fri Oct 6 07:37:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Storm, Christian" X-Patchwork-Id: 822251 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:400c:c09::23a; helo=mail-wm0-x23a.google.com; envelope-from=swupdate+bncbdd6bwv65qpbbpxf3thakgqesodic3i@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="lBdohP9G"; dkim-atps=neutral Received: from mail-wm0-x23a.google.com (mail-wm0-x23a.google.com [IPv6:2a00:1450:400c:c09::23a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y7hLW1j30z9t5C for ; Fri, 6 Oct 2017 18:37:38 +1100 (AEDT) Received: by mail-wm0-x23a.google.com with SMTP id k4sf559202wmc.20 for ; Fri, 06 Oct 2017 00:37:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1507275455; cv=pass; d=google.com; s=arc-20160816; b=Ct6X3v5C/PLdR8SFeXLm6M3PteJ4d/XpzuBnd5/bK8WtLt+WUMij5GSV/NgMHN7qHw hrYvFSVpAajw2DVdFUI3tJx7yqVJT/SyKNNcMJMnnjdVXjYrnDykyU6WilbR32OU7Xxu 9uxvbtnkQ0z7TtHG65GR85cQ58pu9FLS3hWz/aNUJ9sOUqiYv0yu47V+TNlXw86ills4 us02YvnsB7qQ+Q57nsROXXfnXf55BXezdfQiIWxpN0xZHt5RF7IyB0S8soTD6k/gki4H l1jkYzkiTKgWUhr/73CG1GXXWKCaSEK5Zn72qQaroE/Sf0+KXMG2rUslfN6l+B1z2c/E IQuA== 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:message-id:date:subject:cc:to:from :arc-authentication-results:arc-message-signature:mime-version :sender:dkim-signature:arc-authentication-results; bh=ZLt2HGrSt0R5By3hhOIAe9171NziT2VrbBs1ooCMBe4=; b=ews0Vni8ca4dyVWpoG9p/im6BMdHti5ksbWxouwVjY3p/kevnTt05Ws4sKj8byhu7A t4akV11xptWW513bb0Za/HJ2NejNzJFhg3Al7DX27vBP2hHppcJXsvnyxokEwzXI90GO kaDcNkiy7eAEEK9vopYJHhae6pqOfWm3IJfVJyG2Tica8trF8at99R1r4Sc9Y/tyFSo5 8z0jXk/H0cBeiMv8jvcmzw6lbMg9VIK5dGr4ZNlQfMLDet9asKDRVroPpSFuFyshGErn KC1r4FLFuCe/s69ON0cFca22vpkQkD8ne36XK0O3RyNBkXTpsc5nVhvkFJI7SwcTCLVI sT8A== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of christian.storm@siemens.com) smtp.mailfrom=christian.storm@siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=ZLt2HGrSt0R5By3hhOIAe9171NziT2VrbBs1ooCMBe4=; b=lBdohP9GYj/SNsaHxCM4lXtAkoLPweTwtnxnH0w+CeOAbwl0E91YRpnaIOSs43tfsx LsCBKaC6KSQC6Hrl94ZkrL/8crA/oppt7vOePet6JQHinmWqP9R2DkQhcu+IL8urgA/2 ZQzAwT8c4zommKlpVaHF5IwwrL2Pmk9Or6qHyu9yy6x+uks+PSupbgBSR2xp/Uch17wq 3HFluyYul7QR2HrNJUJnFlvcw2tEzWE4RtAoOuJmDCXvNlZcXJTC8nbiSrelOjVMAEvw uCeU220phXUZy9sUmxKySfEcw76Q+OwuE2CF7K+ig3X4kgD027BqvrT64Zo/7SRkXT3X yWdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id: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=ZLt2HGrSt0R5By3hhOIAe9171NziT2VrbBs1ooCMBe4=; b=n2yfb+rIb42f/4RxvMfIQDokTCb0miLiqFL/BdgvSF0aYF/bcGNFbf3QZJJ1isH7Li T8/ETKniYtp0mo/7iaeS/gbsyv00hOId2oapVle22o4ZJTypp9IylVfN2yXd6QByi0Cm H0yFdOKygvIaHq/FR8wsAuyjBYl7L5cAg8KXf4hkw8TmCnmWodGY4wP9sE/CeFX4U0nF uR5bgfAhYyzlqb07jHcZYxDxeLNnnQ/SypDcKKtdA5UJrkLNn3xNG65Jz//WMgPWufGO klB9WuIxppnTS3dATEvQc2m5MWZpZMc0H8DN2LFNloA3MIlGVMbtiOmCaEklIZwFn4Kt G4WQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: AMCzsaVt0BM5A8AboE2nxPAuJPGtB/fLNyY19ohVGqJNI96TNsBfcuhi YmS8f1HzBFpXHEDaA51kITg= X-Google-Smtp-Source: AOwi7QD8LltHNO80vBTD6Pl6Igs1G5DhyVqyQhozM05KkSrk7LvNF9Shh92vvadRNB2g4WJyBgS+bA== X-Received: by 10.28.63.19 with SMTP id m19mr2724wma.28.1507275455048; Fri, 06 Oct 2017 00:37:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 10.28.229.10 with SMTP id c10ls243498wmh.10.canary-gmail; Fri, 06 Oct 2017 00:37:34 -0700 (PDT) X-Received: by 10.28.230.79 with SMTP id d76mr130255wmh.12.1507275454715; Fri, 06 Oct 2017 00:37:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507275454; cv=none; d=google.com; s=arc-20160816; b=KPCHrgFKhwsUdfjdSRn6vH0fJuEAJ+hopmSlxNIuq+E9xGE1fLeUD8gcHKREIIU1xF Ji3KOtVZSk/32kruJJ6OBo4ML3vAQs6MZj6/nHBoSduYg4xL34mWVykv8hAlUrUFcO4L KoM6/KMAt+XErShrrtsTPTcMuoVx/4ZZGqzKsr1vL3ZNTG6wjPtmYefNJE9Et6fllkf6 oNIreeaXAKhXa71XIo179UUm9Jl6lVZmjtXo+MZ8KdKVfwyK5xAjpfIArDbDW9L7Nf4F Rp/tnqVwNpaUqm/XbsJa/opuiUGKR1tuZbnB5/GiwZng+mih41HFkQeoUheBM3vdfmnV TRzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=bj/RKTkNjNlk/OwRw1EptiHFKQCCR0Rj/6SADIK+/kM=; b=WxyOZnQF2qoav1t/hAynPlsPkhZzICy2w9mB+zu5CyQoyf7zQvVoJpHYhSLV8H2xX7 YbpbbEZ1OLx/Mr98giuGaEQ/gG5Nzb1CkcGZxyPfOwAYWrjK323rPHg2ncOb36T6KYjV WQTXr53IBQZeba5cUiKzRZU9mXv8ZpBK80kar6eTZTur0a7BTRTnIoiVfsXw6V+df6tP eGYKWL4VlK/YN15ULgxEG2fdIa56eP8KNsqvIOgcQsN+hCxUQ7yoEC+XzGlPkI5uLojU cWLHebGrGabmATpI92otIysGxDXBMBW2oS/F+yGo+546LRLkjZ+TOY+2F6nqY0RdqXLR GOjQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of christian.storm@siemens.com) smtp.mailfrom=christian.storm@siemens.com Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id 200si176371wmj.0.2017.10.06.00.37.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Oct 2017 00:37:34 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of christian.storm@siemens.com) client-ip=192.35.17.14; Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id v967bYaE017624 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 6 Oct 2017 09:37:34 +0200 Received: from MD1KR9XC.ww002.siemens.net ([139.25.69.251]) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id v967bY84013980; Fri, 6 Oct 2017 09:37:34 +0200 From: Christian Storm To: swupdate@googlegroups.com Cc: Christian Storm Subject: [swupdate] [PATCH] cpio: hint error reason on buffer fill failure Date: Fri, 6 Oct 2017 09:37:21 +0200 Message-Id: <20171006073721.11642-1-christian.storm@siemens.com> X-Mailer: git-send-email 2.14.2 X-Original-Sender: christian.storm@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of christian.storm@siemens.com) smtp.mailfrom=christian.storm@siemens.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: , Instead of only stating the failure, give a more explicative error reason on failure. Signed-off-by: Christian Storm Acked-by: Stefano Babic --- core/cpio_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cpio_utils.c b/core/cpio_utils.c index e8651a3..e962fae 100644 --- a/core/cpio_utils.c +++ b/core/cpio_utils.c @@ -61,7 +61,7 @@ int fill_buffer(int fd, unsigned char *buf, unsigned int nbytes, unsigned long * while (nbytes > 0) { len = read(fd, buf, nbytes); if (len < 0) { - ERROR("Failure in stream: I cannot go on\n"); + ERROR("Failure in stream %d: %s", fd, strerror(errno)); return -EFAULT; } if (len == 0) {