From nobody Wed Apr 03 13:07:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V8lQS5bKjz5Gmhb; Wed, 3 Apr 2024 13:07:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V8lQS52ysz4RfG; Wed, 3 Apr 2024 13:07:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712149632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xaF3Dnpnc2/toOQgacquvzKIuMxSKFhqrYd0LVpeu2o=; b=UnuRO4KS61pTGYQeBzPMfehq9otQqhlmzdGfLdeUih43aWu7f6VQ8YI+v+2784BFlFavzT JwH8RIZtre5ziA/Rkgpsyqf7AgGUCJgIa46qDOhrpz0sQy6R2fIUlNwZH7Ae9DBKBrbHn4 XT+5Y8tZeMQTLBIkUJxt6Gq1kSazy8XJBjMs7THHOKETVt00mm8RQaCFQ0oWlKMgAjrtGt oJ/oPMy3ZFla2Ckhj1OOmtwLv1pjeKCVQW77P3WaAVCS2aAoveiXe82Ih+tEcbNuWrYMl/ TY2lDPiFua9Jj2A/BkrargE9Q/DUl/P2ijJiumhl51AJKvUdtX862G2I9xjo7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712149632; a=rsa-sha256; cv=none; b=jlQzfHPbAaOwsFeb8fvP8x39EEdgABQZc9DwMIdVGzCkj1ppVX3qhxPmzIsi1pLwwoHK/P bh4MnB5zTSFDWWw/145Vh8LzCkNY/oef4zjFET7sjtDQFi2YSst89C3tlKMLVQAN2JKznK IN0HEeDnmZCMzIBUU89OIQOUngqolfX+gLoHf1UpU3zn/nIZt76uF589VozFCwXYCbGd0l 7ghbhec1YJoTaP9FX7zlIZF70pG2ruwBaCNesGy5sx9skL9Q+6ojzLe+plo5Ga5/tsy9PU jGPP4zspB4alg9j0NQuPalOAR2wBDMeA8o5KE4Trwxtl1TWuxTxamXxpMIka7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712149632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xaF3Dnpnc2/toOQgacquvzKIuMxSKFhqrYd0LVpeu2o=; b=sLFNiDqU9n/dXzaXKwxV13EaNoSNuJDmJ0w8j3zMWKrZnM75jYz0rsYcXMfKMeoTG0juYm 6FjMb9bZc14OkxrclDCNdg0TWgFrUboHj6UniXQ6IFCEiIVfglaHR1BUEESk0WZ2E/ImUj OB4Hulf/cF7rr9WhIVhercAhH/r2Dv/rmALvKgCsROrelF2mmjqFkofUEv+qyAxfBf+8hZ RF1azzF1rxgdgZO+DxXRZMye3JfXmPuCn0tb2CsugQSHEf7kRcL12SCJEjdejp6z+fW2TP vDre36bCfQ+ekJeGTd3buTABC0BZeFp6iWbTCYXkc1nIMrxnWvjGbYsmBpF2ZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V8lQS4ZtyzZYj; Wed, 3 Apr 2024 13:07:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 433D7C8U074511; Wed, 3 Apr 2024 13:07:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 433D7CTx074508; Wed, 3 Apr 2024 13:07:12 GMT (envelope-from git) Date: Wed, 3 Apr 2024 13:07:12 GMT Message-Id: <202404031307.433D7CTx074508@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: bade279b8106 - stable/14 - tar: make error reporting more robust and use correct errno List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bade279b8106e9d4166ef2430b4bdbcf17be9953 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=bade279b8106e9d4166ef2430b4bdbcf17be9953 commit bade279b8106e9d4166ef2430b4bdbcf17be9953 Author: Ed Maste AuthorDate: 2024-03-31 14:37:38 +0000 Commit: Ed Maste CommitDate: 2024-04-03 13:06:41 +0000 tar: make error reporting more robust and use correct errno Apply upstream pull request 2101. (cherry picked from commit d68c68693e110353f70b5c04f8de416cf5766eca) --- contrib/libarchive/tar/read.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/libarchive/tar/read.c b/contrib/libarchive/tar/read.c index 2a907518d7cb..94616f279e65 100644 --- a/contrib/libarchive/tar/read.c +++ b/contrib/libarchive/tar/read.c @@ -372,8 +372,9 @@ read_archive(struct bsdtar *bsdtar, char mode, struct archive *writer) if (r != ARCHIVE_OK) { if (!bsdtar->verbose) safe_fprintf(stderr, "%s", archive_entry_pathname(entry)); - fprintf(stderr, ": %s: ", archive_error_string(a)); - fprintf(stderr, "%s", strerror(errno)); + safe_fprintf(stderr, ": %s: %s", + archive_error_string(a), + strerror(archive_errno(a))); if (!bsdtar->verbose) fprintf(stderr, "\n"); bsdtar->return_value = 1;