summaryrefslogtreecommitdiffstats
path: root/bin/pax/pax.c
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2001-05-05 01:10:13 +0000
committerkris <kris@FreeBSD.org>2001-05-05 01:10:13 +0000
commitb48e2b1dc26b8ed5eefa8412ae1efc92d53c6247 (patch)
tree863108cbe97f2ce506e4671f0a90e21db4946c19 /bin/pax/pax.c
parent4ac9ed2901e82789c73fcf17f3c486b55fbef8c2 (diff)
downloadFreeBSD-src-b48e2b1dc26b8ed5eefa8412ae1efc92d53c6247.zip
FreeBSD-src-b48e2b1dc26b8ed5eefa8412ae1efc92d53c6247.tar.gz
Add -z flag to pax to allow gzipping of archive output. Add -z and -Z (gzip
and compress) to pax when used in tar mode (invoked as 'tar') for compatibility with GNU tar. bzip2 functionality for further GNU tar compatibility will be added at a later date. Note in the manpage that -z is non-standard. Obtained from: OpenBSD Reviewed by: -hackers MFC after: 2 weeks
Diffstat (limited to 'bin/pax/pax.c')
-rw-r--r--bin/pax/pax.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/pax/pax.c b/bin/pax/pax.c
index 91719ae..a53ba80 100644
--- a/bin/pax/pax.c
+++ b/bin/pax/pax.c
@@ -53,6 +53,7 @@ static const char rcsid[] =
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/resource.h>
+#include <err.h>
#include <errno.h>
#include <locale.h>
#include <paths.h>
@@ -272,6 +273,8 @@ main(argc, argv)
archive();
break;
case APPND:
+ if (gzip_program != NULL)
+ err(1, "can not gzip while appending");
append();
break;
case COPY:
OpenPOWER on IntegriCloud