diff options
author | kientzle <kientzle@FreeBSD.org> | 2007-09-09 00:07:18 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2007-09-09 00:07:18 +0000 |
commit | 8fc160dac01fee84ee885f1358e4dffb7e772df5 (patch) | |
tree | fd444f3c6dab452c2b71ee9b942c07cf5b3da206 /usr.bin/tar | |
parent | e896f7fb011d3e474a79fd783439b16f1fe95be2 (diff) | |
download | FreeBSD-src-8fc160dac01fee84ee885f1358e4dffb7e772df5.zip FreeBSD-src-8fc160dac01fee84ee885f1358e4dffb7e772df5.tar.gz |
Add --posix as a synonym for --format=pax, for GNU
tar compatibility.
Approved by: re (bmah)
Diffstat (limited to 'usr.bin/tar')
-rw-r--r-- | usr.bin/tar/bsdtar.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/tar/bsdtar.c b/usr.bin/tar/bsdtar.c index 03c6418..d20a5cf 100644 --- a/usr.bin/tar/bsdtar.c +++ b/usr.bin/tar/bsdtar.c @@ -143,6 +143,7 @@ enum { OPTION_NO_SAME_PERMISSIONS, OPTION_NULL, OPTION_ONE_FILE_SYSTEM, + OPTION_POSIX, OPTION_STRIP_COMPONENTS, OPTION_TOTALS, OPTION_USE_COMPRESS_PROGRAM, @@ -194,6 +195,7 @@ static const struct option tar_longopts[] = { { "no-same-permissions",no_argument, NULL, OPTION_NO_SAME_PERMISSIONS }, { "null", no_argument, NULL, OPTION_NULL }, { "one-file-system", no_argument, NULL, OPTION_ONE_FILE_SYSTEM }, + { "posix", no_argument, NULL, OPTION_POSIX }, { "preserve-permissions", no_argument, NULL, 'p' }, { "read-full-blocks", no_argument, NULL, 'B' }, { "same-permissions", no_argument, NULL, 'p' }, @@ -481,6 +483,9 @@ main(int argc, char **argv) bsdtar->extract_flags |= ARCHIVE_EXTRACT_XATTR; bsdtar->extract_flags |= ARCHIVE_EXTRACT_FFLAGS; break; + case OPTION_POSIX: /* GNU tar */ + bsdtar->create_format = "pax"; + break; case 'r': /* SUSv2 */ set_mode(bsdtar, opt); break; |