summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2007-01-05 16:20:21 +0000
committercperciva <cperciva@FreeBSD.org>2007-01-05 16:20:21 +0000
commitc3c6135446dcad6228ba0f001cb0884e0b74a693 (patch)
treee2bc2bfdf58df6e2cedc973fcfbc7a5d77172c8b /usr.bin/tar
parent86bae05a25d17bbdf032b43071161ff8c9d1d4a0 (diff)
downloadFreeBSD-src-c3c6135446dcad6228ba0f001cb0884e0b74a693.zip
FreeBSD-src-c3c6135446dcad6228ba0f001cb0884e0b74a693.tar.gz
If append_archive fails while writing an archive header, output the error
message from the archive being written (not the message from the archive being read, where no error has occurred). MFC after: 3 days
Diffstat (limited to 'usr.bin/tar')
-rw-r--r--usr.bin/tar/write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c
index 7a0ae6c..f382750 100644
--- a/usr.bin/tar/write.c
+++ b/usr.bin/tar/write.c
@@ -488,7 +488,7 @@ append_archive(struct bsdtar *bsdtar, struct archive *a, const char *filename)
/* XXX handle/report errors XXX */
if (archive_write_header(a, in_entry)) {
bsdtar_warnc(bsdtar, 0, "%s",
- archive_error_string(ina));
+ archive_error_string(a));
bsdtar->return_value = 1;
return (-1);
}
OpenPOWER on IntegriCloud