summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2007-07-20 01:24:49 +0000
committerkientzle <kientzle@FreeBSD.org>2007-07-20 01:24:49 +0000
commita6f1d6d2ce40b6d97235fcdbf48511b9b04cfc87 (patch)
tree0f342851871581dedeacf3d57d93ee16900bc2ea /usr.bin/tar
parentbb7e041f722a4cec498a9ef838e4a61a84ceaa5a (diff)
downloadFreeBSD-src-a6f1d6d2ce40b6d97235fcdbf48511b9b04cfc87.zip
FreeBSD-src-a6f1d6d2ce40b6d97235fcdbf48511b9b04cfc87.tar.gz
Don't exit immediately on libarchive warnings, just
set the delayed return value and keep going. Approved by: re (hrs) MFC after: 7 days
Diffstat (limited to 'usr.bin/tar')
-rw-r--r--usr.bin/tar/Makefile2
-rw-r--r--usr.bin/tar/read.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile
index 15b386a..153cd0e 100644
--- a/usr.bin/tar/Makefile
+++ b/usr.bin/tar/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PROG= bsdtar
-VERSION= 2.2.3
+VERSION= 2.2.5
SRCS= bsdtar.c getdate.y matching.c read.c tree.c util.c write.c
WARNS?= 5
DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
diff --git a/usr.bin/tar/read.c b/usr.bin/tar/read.c
index dead37a..b0c5d2c 100644
--- a/usr.bin/tar/read.c
+++ b/usr.bin/tar/read.c
@@ -129,15 +129,15 @@ read_archive(struct bsdtar *bsdtar, char mode)
break;
if (r < ARCHIVE_OK)
bsdtar_warnc(bsdtar, 0, "%s", archive_error_string(a));
+ if (r <= ARCHIVE_WARN)
+ bsdtar->return_value = 1;
if (r == ARCHIVE_RETRY) {
/* Retryable error: try again */
bsdtar_warnc(bsdtar, 0, "Retrying...");
continue;
}
- if (r != ARCHIVE_OK) {
- bsdtar->return_value = 1;
+ if (r == ARCHIVE_FATAL)
break;
- }
/*
* Exclude entries that are too old.
OpenPOWER on IntegriCloud