diff options
| author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-11-27 20:24:40 +0000 |
|---|---|---|
| committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-11-27 20:24:40 +0000 |
| commit | b2e5dc6d2fa7b486cf2fb0bb0e816137c3122798 (patch) | |
| tree | e0492833a7eec3af094e533fcc3b3444844ba360 | |
| parent | 0f7eb34de96278d606197dcf4510dd4c5f178153 (diff) | |
| download | busybox-w32-b2e5dc6d2fa7b486cf2fb0bb0e816137c3122798.tar.gz busybox-w32-b2e5dc6d2fa7b486cf2fb0bb0e816137c3122798.tar.bz2 busybox-w32-b2e5dc6d2fa7b486cf2fb0bb0e816137c3122798.zip | |
tar: fix misplaced --exclude long option definition
git-svn-id: svn://busybox.net/trunk/busybox@16695 69ca8d6d-28ef-0310-b511-8ec308f3f277
| -rw-r--r-- | archival/tar.c | 13 |
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 |
