aboutsummaryrefslogtreecommitdiff
path: root/archival/tar.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/tar.c')
-rw-r--r--archival/tar.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/archival/tar.c b/archival/tar.c
index f62b33005..44ab246c0 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -940,6 +940,11 @@ static const char tar_longopts[] ALIGN1 =
940 "exclude\0" Required_argument "\xff" 940 "exclude\0" Required_argument "\xff"
941# endif 941# endif
942 ; 942 ;
943# define GETOPT32 getopt32long
944# define LONGOPTS ,tar_longopts
945#else
946# define GETOPT32 getopt32
947# define LONGOPTS
943#endif 948#endif
944 949
945int tar_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 950int tar_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
@@ -980,9 +985,6 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
980 ":\xf9+" // --strip-components=NUM 985 ":\xf9+" // --strip-components=NUM
981#endif 986#endif
982 ; 987 ;
983#if ENABLE_FEATURE_TAR_LONG_OPTIONS
984 applet_long_options = tar_longopts;
985#endif
986#if ENABLE_DESKTOP 988#if ENABLE_DESKTOP
987 /* Lie to buildroot when it starts asking stupid questions. */ 989 /* Lie to buildroot when it starts asking stupid questions. */
988 if (argv[1] && strcmp(argv[1], "--version") == 0) { 990 if (argv[1] && strcmp(argv[1], "--version") == 0) {
@@ -1019,7 +1021,7 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
1019 } 1021 }
1020 } 1022 }
1021#endif 1023#endif
1022 opt = getopt32(argv, 1024 opt = GETOPT32(argv,
1023 "txC:f:Oopvk" 1025 "txC:f:Oopvk"
1024 IF_FEATURE_TAR_CREATE( "ch" ) 1026 IF_FEATURE_TAR_CREATE( "ch" )
1025 IF_FEATURE_SEAMLESS_BZ2( "j" ) 1027 IF_FEATURE_SEAMLESS_BZ2( "j" )
@@ -1030,6 +1032,7 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
1030 IF_FEATURE_SEAMLESS_Z( "Z" ) 1032 IF_FEATURE_SEAMLESS_Z( "Z" )
1031 IF_FEATURE_TAR_NOPRESERVE_TIME("m") 1033 IF_FEATURE_TAR_NOPRESERVE_TIME("m")
1032 IF_FEATURE_TAR_LONG_OPTIONS("\xf9:") // --strip-components 1034 IF_FEATURE_TAR_LONG_OPTIONS("\xf9:") // --strip-components
1035 LONGOPTS
1033 , &base_dir // -C dir 1036 , &base_dir // -C dir
1034 , &tar_filename // -f filename 1037 , &tar_filename // -f filename
1035 IF_FEATURE_TAR_FROM(, &(tar_handle->accept)) // T 1038 IF_FEATURE_TAR_FROM(, &(tar_handle->accept)) // T