aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-11-27 20:24:40 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-11-27 20:24:40 +0000
commit30d7a346e68bb7f0cb916e6c1e75dd75822d88a8 (patch)
treee0492833a7eec3af094e533fcc3b3444844ba360
parent5e90e106474d81d2bf8a9b3769ef746ca05040fa (diff)
downloadbusybox-w32-30d7a346e68bb7f0cb916e6c1e75dd75822d88a8.tar.gz
busybox-w32-30d7a346e68bb7f0cb916e6c1e75dd75822d88a8.tar.bz2
busybox-w32-30d7a346e68bb7f0cb916e6c1e75dd75822d88a8.zip
tar: fix misplaced --exclude long option definition
-rw-r--r--archival/tar.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/archival/tar.c b/archival/tar.c
index be3df687e..ca6c1696e 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -704,7 +704,6 @@ static const struct option tar_long_options[] = {
704# if ENABLE_FEATURE_TAR_FROM 704# if ENABLE_FEATURE_TAR_FROM
705 { "files-from", 1, NULL, 'T' }, 705 { "files-from", 1, NULL, 'T' },
706 { "exclude-from", 1, NULL, 'X' }, 706 { "exclude-from", 1, NULL, 'X' },
707 { "exclude", 1, NULL, 0xfd },
708# endif 707# endif
709# if ENABLE_FEATURE_TAR_GZIP 708# if ENABLE_FEATURE_TAR_GZIP
710 { "gzip", 0, NULL, 'z' }, 709 { "gzip", 0, NULL, 'z' },
@@ -712,8 +711,14 @@ static const struct option tar_long_options[] = {
712# if ENABLE_FEATURE_TAR_COMPRESS 711# if ENABLE_FEATURE_TAR_COMPRESS
713 { "compress", 0, NULL, 'Z' }, 712 { "compress", 0, NULL, 'Z' },
714# endif 713# endif
715 { "no-same-owner", 0, NULL, 0xfe }, 714 { "no-same-owner", 0, NULL, 0xfd },
716 { "no-same-permissions",0, NULL, 0xff }, 715 { "no-same-permissions",0, NULL, 0xfe },
716 /* --exclude takes next bit position in option mask, */
717 /* therefore we have to either put it _after_ --no-same-perm */
718 /* or add OPT[BIT]_EXCLUDE before OPT[BIT]_NOPRESERVE_OWN */
719# if ENABLE_FEATURE_TAR_FROM
720 { "exclude", 1, NULL, 0xff },
721# endif
717 { 0, 0, 0, 0 } 722 { 0, 0, 0, 0 }
718}; 723};
719#else 724#else
@@ -741,7 +746,7 @@ int tar_main(int argc, char **argv)
741 "tt:vv:" // count -t,-v 746 "tt:vv:" // count -t,-v
742 "?:" // bail out with usage instead of error return 747 "?:" // bail out with usage instead of error return
743 "X::T::" // cumulative lists 748 "X::T::" // cumulative lists
744 "\xfd::" // cumulative lists for --exclude 749 "\xff::" // cumulative lists for --exclude
745 USE_FEATURE_TAR_CREATE("c:") "t:x:" // at least one of these is reqd 750 USE_FEATURE_TAR_CREATE("c:") "t:x:" // at least one of these is reqd
746 USE_FEATURE_TAR_CREATE("c--tx:t--cx:x--ct") // mutually exclusive 751 USE_FEATURE_TAR_CREATE("c--tx:t--cx:x--ct") // mutually exclusive
747 SKIP_FEATURE_TAR_CREATE("t--x:x--t"); // mutually exclusive 752 SKIP_FEATURE_TAR_CREATE("t--x:x--t"); // mutually exclusive