From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2A0BB138D18 for ; Mon, 13 Jul 2015 09:15:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 80F00E0830; Mon, 13 Jul 2015 09:15:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 10B7CE0830 for ; Mon, 13 Jul 2015 09:14:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DEC073408FE for ; Mon, 13 Jul 2015 09:14:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 91133902 for ; Mon, 13 Jul 2015 09:14:57 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1436777283.fa5ae8d08656c784c41818b298aa9321458b15ce.vapier@gentoo> Subject: [gentoo-commits] proj/pax-utils:master commit in: / X-VCS-Repository: proj/pax-utils X-VCS-Files: paxinc.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: fa5ae8d08656c784c41818b298aa9321458b15ce X-VCS-Branch: master Date: Mon, 13 Jul 2015 09:14:57 +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-Archives-Salt: 91a672e5-aab9-4bac-87cc-a312d1bc5633 X-Archives-Hash: e94666a5befa8626b85d8281e5d8fa6b commit: fa5ae8d08656c784c41818b298aa9321458b15ce Author: Mike Frysinger gentoo org> AuthorDate: Mon Jul 13 08:48:03 2015 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Jul 13 08:48:03 2015 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=fa5ae8d0 scanelf: include filename/details in all ar related messages When scanelf runs on a directory tree, it might issue an error message about invalid data because of one of the files in there. Trying to then track down that file is kind of a pain, so make things more explicit. paxinc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paxinc.c b/paxinc.c index b9a196b..f2ce3c5 100644 --- a/paxinc.c +++ b/paxinc.c @@ -40,7 +40,7 @@ archive_handle *ar_open(const char *filename) archive_handle *ret; if ((fd=open(filename, O_RDONLY)) == -1) - err("Could not open '%s'", filename); + errp("%s: could not open", filename); ret = ar_open_fd(filename, fd); if (ret == NULL) @@ -76,13 +76,13 @@ close_and_ret: } if ((ret.buf.formatted.magic[0] != '`') || (ret.buf.formatted.magic[1] != '\n')) { - warn("Invalid ar entry"); + warn("%s: invalid ar entry", ar->filename); goto close_and_ret; } if (ret.buf.formatted.name[0] == '/' && ret.buf.formatted.name[1] == '/') { if (ar->extfn != NULL) { - warn("Duplicate GNU extended filename section"); + warn("%s: Duplicate GNU extended filename section", ar->filename); goto close_and_ret; } len = atoi(ret.buf.formatted.size); @@ -112,7 +112,7 @@ close_and_ret: } else if (s[0] == '/' && s[1] >= '0' && s[1] <= '9') { /* GNU extended filename */ if (ar->extfn == NULL) { - warn("GNU extended filename without special data section"); + warn("%s: GNU extended filename without special data section", ar->filename); goto close_and_ret; } s = ar->extfn + atoi(s + 1);