From nobody Sun Mar 31 14:40:29 2024 X-Original-To: dev-commits-src-main@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 4V6xdT5HWnz5G9hj; Sun, 31 Mar 2024 14:40:29 +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 4V6xdT4jJlz4gNs; Sun, 31 Mar 2024 14:40:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711896029; 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=16uIcKYNXP0YsiEqlMg59NRcbtsIzadBo/WQeOZ/OJk=; b=o4mIcH3vmkqDLcwtfJyZIkY23K5wFFBKa0mXbs3DUVCoFKYubPoipnZ66k3dKj4CYvuKq/ ERYZmL2sxYb8szTT81+3PIlyAYEbzK1dSFTpMvmJXE4IAmBjyO9oAhS4Ju3Y+t8B4yGFBq I8yUo+ttDbLYGx9hO7IV//KDpNHxYkH2z9tTum5vthC7a6qY9B3usKKt5TPjNZ36jsfBW+ kK0+jRl9bQD1huSxA1Y6GVZ5/obbrF3jsQxGaaMt+2GWlVcEL0tUPQqo3WuMp4LYWnnBZm ktLAD8lGi45xVckKqsUSk3ybfYpkVCVV+pBo8PgfsfycWs/VwFlAhoD8bfsiQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711896029; a=rsa-sha256; cv=none; b=CLXbW2OiqQPM86PXAe+JbP6Kg7WCgRVDD1ns3pFhok8JiNJigodn+Q+v9/k7V6odj6zDZO rBsnXEzlGCyVbo3HrX4x65VLkNF6pFKwID7HF2uT6qk/XF6YYAUZI9dJz0IgxcRV+ZH6FA dsdJHRa4Xexmytlx0MOL+W7rBLjNdSXUHtNs7cJGycy3XlL22DzPBrkqGs+0e65L/Msn06 QxOG5Z1UxgE7CeHxh6LeSmsnKpyvu8mXh5ecbpXpw0YMqwFI7d8N8h+Z16MYh7mRsfs3UB u/9X6eIiR3eU3eHw4eBhB+nSZliKuODieH0rZmOqsTNvtU6+mNrrEv5ioh9d2A== 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=1711896029; 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=16uIcKYNXP0YsiEqlMg59NRcbtsIzadBo/WQeOZ/OJk=; b=l7Xa1bZl4AiIhV/iQKB3M/dLfLoRuQT5jJ3IqOCCraxT/53deXE4hrqh0GswlWYf/Z/hip BA+e1byVrsM3Fp/D9lA9aTfikJtCJrQaHXwFlK3WnPVLSnwRH4j99CPoKupjMOvTpM5l3s /2ZG69XbZRBsFvHUNuUdn+kMYW3Dk/i5H+UVctPkE58wqTdkqFYmzzbM9Qr4fROdyKOrDU Y2FTS7Jjkhz2qBrvC+GkVJQ0YYStia+mi++wDkAbDYIT9jdHsfjkzcyttcaQtic+hWPd22 eSqDBox7m76xcdUaWOex/5WDXDLboxT5ovjx3G2N0djmA9hzH1JmrBRiKaowug== 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 4V6xdT433WzhvN; Sun, 31 Mar 2024 14:40:29 +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 42VEeTFv010995; Sun, 31 Mar 2024 14:40:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42VEeTCm010992; Sun, 31 Mar 2024 14:40:29 GMT (envelope-from git) Date: Sun, 31 Mar 2024 14:40:29 GMT Message-Id: <202403311440.42VEeTCm010992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: d68c68693e11 - main - tar: make error reporting more robust and use correct errno List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: d68c68693e110353f70b5c04f8de416cf5766eca Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d68c68693e110353f70b5c04f8de416cf5766eca commit d68c68693e110353f70b5c04f8de416cf5766eca Author: Ed Maste AuthorDate: 2024-03-31 14:37:38 +0000 Commit: Ed Maste CommitDate: 2024-03-31 14:39:53 +0000 tar: make error reporting more robust and use correct errno Apply upstream pull request 2101. --- 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;