diff options
author | kientzle <kientzle@FreeBSD.org> | 2004-05-18 17:16:55 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2004-05-18 17:16:55 +0000 |
commit | 014551a39fadb5a57908960ce0a0c8b9dc2deec6 (patch) | |
tree | 30e0820a8afb57e08eedab3b771394c22c2be9d6 /usr.bin/tar | |
parent | 13bf43568a605dfd559c99b52dfd7c3ccfc9e145 (diff) | |
download | FreeBSD-src-014551a39fadb5a57908960ce0a0c8b9dc2deec6.zip FreeBSD-src-014551a39fadb5a57908960ce0a0c8b9dc2deec6.tar.gz |
Accept (but ignore) GNU tar's -B option. bsdtar never
needs it, but it does no harm for people to specify it.
Diffstat (limited to 'usr.bin/tar')
-rw-r--r-- | usr.bin/tar/bsdtar.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/tar/bsdtar.c b/usr.bin/tar/bsdtar.c index a74db38..7fada97 100644 --- a/usr.bin/tar/bsdtar.c +++ b/usr.bin/tar/bsdtar.c @@ -55,7 +55,7 @@ static char ** rewrite_argv(struct bsdtar *, int *argc, char ** src_argv, const char *optstring); -const char *tar_opts = "b:C:cF:f:HhjkLlmnOoPprtT:UuvwXxyZz"; +const char *tar_opts = "Bb:C:cF:f:HhjkLlmnOoPprtT:UuvwXxyZz"; #ifdef HAVE_GETOPT_LONG /* @@ -101,6 +101,7 @@ const struct option tar_longopts[] = { { "nodump", no_argument, NULL, OPTION_NODUMP }, { "norecurse", no_argument, NULL, 'n' }, { "preserve-permissions", no_argument, NULL, 'p' }, + { "read-full-blocks", no_argument, NULL, 'B' }, { "same-permissions", no_argument, NULL, 'p' }, { "to-stdout", no_argument, NULL, 'O' }, { "unlink", no_argument, NULL, 'U' }, @@ -173,8 +174,13 @@ main(int argc, char **argv) #else while ((opt = getopt(bsdtar->argc, bsdtar->argv, tar_opts)) != -1) { #endif - /* XXX TODO: Augment the compatibility notes below. */ switch (opt) { + case 'B': /* GNU tar */ + /* + * bsdtar is stream-based internally, so this + * option has no effect. Just ignore it. + */ + break; case 'b': /* SUSv2 */ bsdtar->bytes_per_block = 512 * atoi(optarg); break; |