diff options
| author | Ron Yorston <rmy@pobox.com> | 2026-03-24 12:15:33 +0000 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2026-03-24 12:15:33 +0000 |
| commit | aaae1865727bcd53da581340456de34dfb182d5c (patch) | |
| tree | b0be881225fad8bcb14977854b248539b7d81ea2 /archival/tar.c | |
| parent | 052807cc3330b3c5c1fb60b93ad0d2039d6142df (diff) | |
| download | busybox-w32-zstd.tar.gz busybox-w32-zstd.tar.bz2 busybox-w32-zstd.zip | |
archival: support zstd in rpm and dpkgzstd
Diffstat (limited to 'archival/tar.c')
| -rw-r--r-- | archival/tar.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/archival/tar.c b/archival/tar.c index c3e9f0e0c..033e08105 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
| @@ -856,8 +856,8 @@ enum { | |||
| 856 | IF_FEATURE_TAR_NOPRESERVE_TIME(OPTBIT_NOPRESERVE_TIME,) | 856 | IF_FEATURE_TAR_NOPRESERVE_TIME(OPTBIT_NOPRESERVE_TIME,) |
| 857 | #if ENABLE_FEATURE_TAR_LONG_OPTIONS | 857 | #if ENABLE_FEATURE_TAR_LONG_OPTIONS |
| 858 | OPTBIT_STRIP_COMPONENTS, | 858 | OPTBIT_STRIP_COMPONENTS, |
| 859 | IF_FEATURE_SEAMLESS_LZMA(OPTBIT_LZMA ,) | ||
| 860 | IF_FEATURE_SEAMLESS_ZSTD(OPTBIT_ZSTD ,) | 859 | IF_FEATURE_SEAMLESS_ZSTD(OPTBIT_ZSTD ,) |
| 860 | IF_FEATURE_SEAMLESS_LZMA(OPTBIT_LZMA ,) | ||
| 861 | OPTBIT_NORECURSION, | 861 | OPTBIT_NORECURSION, |
| 862 | IF_FEATURE_TAR_TO_COMMAND(OPTBIT_2COMMAND ,) | 862 | IF_FEATURE_TAR_TO_COMMAND(OPTBIT_2COMMAND ,) |
| 863 | OPTBIT_NUMERIC_OWNER, | 863 | OPTBIT_NUMERIC_OWNER, |
| @@ -884,8 +884,8 @@ enum { | |||
| 884 | OPT_AUTOCOMPRESS_BY_EXT = 1 << OPTBIT_AUTOCOMPRESS_BY_EXT, // a | 884 | OPT_AUTOCOMPRESS_BY_EXT = 1 << OPTBIT_AUTOCOMPRESS_BY_EXT, // a |
| 885 | OPT_NOPRESERVE_TIME = IF_FEATURE_TAR_NOPRESERVE_TIME((1 << OPTBIT_NOPRESERVE_TIME)) + 0, // m | 885 | OPT_NOPRESERVE_TIME = IF_FEATURE_TAR_NOPRESERVE_TIME((1 << OPTBIT_NOPRESERVE_TIME)) + 0, // m |
| 886 | OPT_STRIP_COMPONENTS = IF_FEATURE_TAR_LONG_OPTIONS((1 << OPTBIT_STRIP_COMPONENTS)) + 0, // strip-components | 886 | OPT_STRIP_COMPONENTS = IF_FEATURE_TAR_LONG_OPTIONS((1 << OPTBIT_STRIP_COMPONENTS)) + 0, // strip-components |
| 887 | OPT_LZMA = IF_FEATURE_TAR_LONG_OPTIONS(IF_FEATURE_SEAMLESS_LZMA((1 << OPTBIT_LZMA))) + 0, // lzma | ||
| 888 | OPT_ZSTD = IF_FEATURE_TAR_LONG_OPTIONS(IF_FEATURE_SEAMLESS_ZSTD((1 << OPTBIT_ZSTD))) + 0, // zstd | 887 | OPT_ZSTD = IF_FEATURE_TAR_LONG_OPTIONS(IF_FEATURE_SEAMLESS_ZSTD((1 << OPTBIT_ZSTD))) + 0, // zstd |
| 888 | OPT_LZMA = IF_FEATURE_TAR_LONG_OPTIONS(IF_FEATURE_SEAMLESS_LZMA((1 << OPTBIT_LZMA))) + 0, // lzma | ||
| 889 | OPT_NORECURSION = IF_FEATURE_TAR_LONG_OPTIONS((1 << OPTBIT_NORECURSION )) + 0, // no-recursion | 889 | OPT_NORECURSION = IF_FEATURE_TAR_LONG_OPTIONS((1 << OPTBIT_NORECURSION )) + 0, // no-recursion |
| 890 | OPT_2COMMAND = IF_FEATURE_TAR_TO_COMMAND( (1 << OPTBIT_2COMMAND )) + 0, // to-command | 890 | OPT_2COMMAND = IF_FEATURE_TAR_TO_COMMAND( (1 << OPTBIT_2COMMAND )) + 0, // to-command |
| 891 | OPT_NUMERIC_OWNER = IF_FEATURE_TAR_LONG_OPTIONS((1 << OPTBIT_NUMERIC_OWNER )) + 0, // numeric-owner | 891 | OPT_NUMERIC_OWNER = IF_FEATURE_TAR_LONG_OPTIONS((1 << OPTBIT_NUMERIC_OWNER )) + 0, // numeric-owner |
| @@ -932,13 +932,13 @@ static const char tar_longopts[] ALIGN1 = | |||
| 932 | # if ENABLE_FEATURE_TAR_NOPRESERVE_TIME | 932 | # if ENABLE_FEATURE_TAR_NOPRESERVE_TIME |
| 933 | "touch\0" No_argument "m" | 933 | "touch\0" No_argument "m" |
| 934 | # endif | 934 | # endif |
| 935 | "strip-components\0" Required_argument "\xf8" | 935 | "strip-components\0" Required_argument "\xf7" |
| 936 | # if ENABLE_FEATURE_SEAMLESS_ZSTD | ||
| 937 | "zstd\0" No_argument "\xf8" | ||
| 938 | # endif | ||
| 936 | # if ENABLE_FEATURE_SEAMLESS_LZMA | 939 | # if ENABLE_FEATURE_SEAMLESS_LZMA |
| 937 | "lzma\0" No_argument "\xf9" | 940 | "lzma\0" No_argument "\xf9" |
| 938 | # endif | 941 | # endif |
| 939 | # if ENABLE_FEATURE_SEAMLESS_ZSTD | ||
| 940 | "zstd\0" No_argument "\xf7" | ||
| 941 | # endif | ||
| 942 | "no-recursion\0" No_argument "\xfa" | 942 | "no-recursion\0" No_argument "\xfa" |
| 943 | # if ENABLE_FEATURE_TAR_TO_COMMAND | 943 | # if ENABLE_FEATURE_TAR_TO_COMMAND |
| 944 | "to-command\0" Required_argument "\xfb" | 944 | "to-command\0" Required_argument "\xfb" |
| @@ -1033,7 +1033,7 @@ int tar_main(int argc UNUSED_PARAM, char **argv) | |||
| 1033 | IF_FEATURE_SEAMLESS_Z( "Z" ) | 1033 | IF_FEATURE_SEAMLESS_Z( "Z" ) |
| 1034 | "a" | 1034 | "a" |
| 1035 | IF_FEATURE_TAR_NOPRESERVE_TIME("m") | 1035 | IF_FEATURE_TAR_NOPRESERVE_TIME("m") |
| 1036 | IF_FEATURE_TAR_LONG_OPTIONS("\xf8:") // --strip-components | 1036 | IF_FEATURE_TAR_LONG_OPTIONS("\xf7:") // --strip-components |
| 1037 | "\0" | 1037 | "\0" |
| 1038 | "tt:vv:" // count -t,-v | 1038 | "tt:vv:" // count -t,-v |
| 1039 | #if ENABLE_FEATURE_TAR_LONG_OPTIONS && ENABLE_FEATURE_TAR_FROM | 1039 | #if ENABLE_FEATURE_TAR_LONG_OPTIONS && ENABLE_FEATURE_TAR_FROM |
| @@ -1043,7 +1043,7 @@ int tar_main(int argc UNUSED_PARAM, char **argv) | |||
| 1043 | IF_FEATURE_TAR_CREATE("c--tx:t--cx:x--ct") // mutually exclusive | 1043 | IF_FEATURE_TAR_CREATE("c--tx:t--cx:x--ct") // mutually exclusive |
| 1044 | IF_NOT_FEATURE_TAR_CREATE("t--x:x--t") // mutually exclusive | 1044 | IF_NOT_FEATURE_TAR_CREATE("t--x:x--t") // mutually exclusive |
| 1045 | #if ENABLE_FEATURE_TAR_LONG_OPTIONS | 1045 | #if ENABLE_FEATURE_TAR_LONG_OPTIONS |
| 1046 | ":\xf8+" // --strip-components=NUM | 1046 | ":\xf7+" // --strip-components=NUM |
| 1047 | #endif | 1047 | #endif |
| 1048 | LONGOPTS | 1048 | LONGOPTS |
| 1049 | , &base_dir // -C dir | 1049 | , &base_dir // -C dir |
| @@ -1083,8 +1083,8 @@ int tar_main(int argc UNUSED_PARAM, char **argv) | |||
| 1083 | showopt(OPT_AUTOCOMPRESS_BY_EXT); | 1083 | showopt(OPT_AUTOCOMPRESS_BY_EXT); |
| 1084 | showopt(OPT_NOPRESERVE_TIME ); | 1084 | showopt(OPT_NOPRESERVE_TIME ); |
| 1085 | showopt(OPT_STRIP_COMPONENTS); | 1085 | showopt(OPT_STRIP_COMPONENTS); |
| 1086 | showopt(OPT_LZMA ); | ||
| 1087 | showopt(OPT_ZSTD ); | 1086 | showopt(OPT_ZSTD ); |
| 1087 | showopt(OPT_LZMA ); | ||
| 1088 | showopt(OPT_NORECURSION ); | 1088 | showopt(OPT_NORECURSION ); |
| 1089 | showopt(OPT_2COMMAND ); | 1089 | showopt(OPT_2COMMAND ); |
| 1090 | showopt(OPT_NUMERIC_OWNER ); | 1090 | showopt(OPT_NUMERIC_OWNER ); |
