1 Allows compatibility with tar -m / --touch command line option
2 By Yauheni Kaliuta <yauheni.kaliuta@nokia.com>
4 Ported to BusyBox 1.19 by Dennis Groenen <tj.groenen@gmail.com> - 2011-08-19
7 --- a/archival/Config.src
8 +++ b/archival/Config.src
9 @@ -280,6 +280,13 @@ config FEATURE_TAR_LONG_OPTIONS
11 Enable use of long options, increases size by about 400 Bytes
13 +config FEATURE_TAR_TOUCH
14 + bool "Enable ignoring touch option"
18 + Allows compatibility with -m / --touch command line option.
20 config FEATURE_TAR_TO_COMMAND
21 bool "Support for writing to an external program"
25 @@ -819,6 +819,7 @@ enum {
26 IF_FEATURE_TAR_TO_COMMAND(OPTBIT_2COMMAND ,)
28 OPTBIT_NOPRESERVE_PERM,
29 + IF_FEATURE_TAR_TOUCH( OPTBIT_TOUCH ,)
32 OPT_TEST = 1 << 0, // t
33 @@ -842,6 +843,7 @@ enum {
34 OPT_2COMMAND = IF_FEATURE_TAR_TO_COMMAND( (1 << OPTBIT_2COMMAND )) + 0, // to-command
35 OPT_NUMERIC_OWNER = IF_FEATURE_TAR_LONG_OPTIONS((1 << OPTBIT_NUMERIC_OWNER )) + 0, // numeric-owner
36 OPT_NOPRESERVE_PERM = IF_FEATURE_TAR_LONG_OPTIONS((1 << OPTBIT_NOPRESERVE_PERM)) + 0, // no-same-permissions
37 + OPT_TOUCH = IF_FEATURE_TAR_TOUCH( (1 << OPTBIT_TOUCH )) + 0, // m
38 OPT_OVERWRITE = IF_FEATURE_TAR_LONG_OPTIONS((1 << OPTBIT_OVERWRITE )) + 0, // overwrite
40 #if ENABLE_FEATURE_TAR_LONG_OPTIONS
41 @@ -895,6 +897,9 @@ static const char tar_longopts[] ALIGN1
42 # if ENABLE_FEATURE_TAR_FROM
43 "exclude\0" Required_argument "\xff"
45 +# if ENABLE_FEATURE_TAR_TOUCH
46 + "touch\0" No_argument "m"
51 @@ -970,6 +975,7 @@ int tar_main(int argc UNUSED_PARAM, char
52 IF_FEATURE_SEAMLESS_GZ( "z" )
53 IF_FEATURE_SEAMLESS_Z( "Z" )
54 IF_FEATURE_TAR_NOPRESERVE_TIME("m")
55 + IF_FEATURE_TAR_TOUCH( "m" )
57 , &tar_filename // -f filename
58 IF_FEATURE_TAR_FROM(, &(tar_handle->accept)) // T