From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 21D4B138334 for ; Sat, 30 Mar 2019 10:12:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B19DE07D7; Sat, 30 Mar 2019 10:12:18 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 10C87E07D7 for ; Sat, 30 Mar 2019 10:12:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4EE59335CFF for ; Sat, 30 Mar 2019 10:12:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BAB7F578 for ; Sat, 30 Mar 2019 10:12:14 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1553940715.dac123cefa79db06f25b64f8f863b85aa2456342.blueness@gentoo> Subject: [gentoo-commits] proj/elfix:master commit in: misc/install-xattr/ X-VCS-Repository: proj/elfix X-VCS-Files: misc/install-xattr/checkcopyattrs.sh misc/install-xattr/install-xattr.c X-VCS-Directories: misc/install-xattr/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: dac123cefa79db06f25b64f8f863b85aa2456342 X-VCS-Branch: master Date: Sat, 30 Mar 2019 10:12:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 60b18355-89cc-46b0-9268-21050a9863ca X-Archives-Hash: 5c192a481bc3353137062bc762c32677 commit: dac123cefa79db06f25b64f8f863b85aa2456342 Author: Nick Bowler draconx ca> AuthorDate: Sat Mar 30 10:10:31 2019 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sat Mar 30 10:11:55 2019 +0000 URL: https://gitweb.gentoo.org/proj/elfix.git/commit/?id=dac123ce install-xattr: report any errors by "stat" Signed-off-by: Anthony G. Basile gentoo.org> misc/install-xattr/checkcopyattrs.sh | 3 +++ misc/install-xattr/install-xattr.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/misc/install-xattr/checkcopyattrs.sh b/misc/install-xattr/checkcopyattrs.sh index 9196795..a9149d7 100755 --- a/misc/install-xattr/checkcopyattrs.sh +++ b/misc/install-xattr/checkcopyattrs.sh @@ -49,6 +49,9 @@ setfattr -n user.pax.flags -v "r" c [ "$(getfattr --only-values -n user.bas f/a)" == "x" ] [ "$(getfattr --only-values -n user.pax.flags f/a)" == "mr" ] +# Check that we can copy large files +truncate -s2G a +./install-xattr a x # The following are just tests to make sure the raw install # options don't get lost in our optargs parsing. diff --git a/misc/install-xattr/install-xattr.c b/misc/install-xattr/install-xattr.c index 0b5eb25..3e20b63 100644 --- a/misc/install-xattr/install-xattr.c +++ b/misc/install-xattr/install-xattr.c @@ -365,8 +365,10 @@ main(int argc, char* argv[]) if (!opts_target_directory) { target = argv[last]; - if (stat(target, &s) != 0) + if (stat(target, &s) != 0) { + err(1, "failed to stat %s", target); return EXIT_FAILURE; + } target_is_directory = S_ISDIR(s.st_mode); } else { /* target was set above with the -t option */ @@ -381,8 +383,10 @@ main(int argc, char* argv[]) last++; for (i = first; i < last; i++) { - if (stat(argv[i], &s) != 0) + if (stat(argv[i], &s) != 0) { + err(1, "failed to stat %s", argv[i]); return EXIT_FAILURE; + } /* We reproduce install's behavior and skip * all extra directories on the command line * that are not the final target directory.