aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/touch.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 92e134168..690517e66 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -90,12 +90,12 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
90 int opts; 90 int opts;
91 enum { 91 enum {
92 OPT_c = (1 << 0), 92 OPT_c = (1 << 0),
93 OPT_r = (1 << 1) * ENABLE_FEATURE_TOUCH_SUSV3, 93 OPT_h = (1 << 1) * ENABLE_FEATURE_TOUCH_NODEREF,
94 OPT_d = (1 << 2) * ENABLE_FEATURE_TOUCH_SUSV3, 94 OPT_r = (1 << (1+ENABLE_FEATURE_TOUCH_NODEREF)) * ENABLE_FEATURE_TOUCH_SUSV3,
95 OPT_t = (1 << 3) * ENABLE_FEATURE_TOUCH_SUSV3, 95 OPT_d = (1 << (2+ENABLE_FEATURE_TOUCH_NODEREF)) * ENABLE_FEATURE_TOUCH_SUSV3,
96 OPT_a = (1 << 4) * ENABLE_FEATURE_TOUCH_SUSV3, 96 OPT_t = (1 << (3+ENABLE_FEATURE_TOUCH_NODEREF)) * ENABLE_FEATURE_TOUCH_SUSV3,
97 OPT_m = (1 << 5) * ENABLE_FEATURE_TOUCH_SUSV3, 97 OPT_a = (1 << (4+ENABLE_FEATURE_TOUCH_NODEREF)) * ENABLE_FEATURE_TOUCH_SUSV3,
98 OPT_h = (1 << 6) * ENABLE_FEATURE_TOUCH_NODEREF, 98 OPT_m = (1 << (5+ENABLE_FEATURE_TOUCH_NODEREF)) * ENABLE_FEATURE_TOUCH_SUSV3,
99 }; 99 };
100 /* NULL = use current time */ 100 /* NULL = use current time */
101 const struct timeval *newtime = NULL; 101 const struct timeval *newtime = NULL;
@@ -122,9 +122,10 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
122 122
123 /* -d and -t both set time. In coreutils, 123 /* -d and -t both set time. In coreutils,
124 * accepted data format differs a bit between -d and -t. 124 * accepted data format differs a bit between -d and -t.
125 * We accept the same formats for both */ 125 * We accept the same formats for both
126 opts = getopt32long(argv, "c" IF_FEATURE_TOUCH_SUSV3("r:d:t:am") 126 */
127 IF_FEATURE_TOUCH_NODEREF("h") 127 opts = getopt32long(argv, "c" IF_FEATURE_TOUCH_NODEREF("h")
128 IF_FEATURE_TOUCH_SUSV3("r:d:t:am")
128 /*ignored:*/ "f" IF_NOT_FEATURE_TOUCH_SUSV3("am"), 129 /*ignored:*/ "f" IF_NOT_FEATURE_TOUCH_SUSV3("am"),
129 touch_longopts 130 touch_longopts
130#if ENABLE_FEATURE_TOUCH_SUSV3 131#if ENABLE_FEATURE_TOUCH_SUSV3