rpm2cpio: handle bz2 too; code shrink
[oweals/busybox.git] / coreutils / touch.c
index 1b4a5f0ea018b722e8e68e8cd836271827139873..e79092fc1cf9bf2c35dbec55b72f14b7ed0ebb1d 100644 (file)
@@ -64,10 +64,14 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
 #if ENABLE_DESKTOP && ENABLE_LONG_OPTS
        applet_long_options = touch_longopts;
 #endif
-       opts = getopt32(argv, "c" IF_DESKTOP("r:d:")
+       /* -d and -t both set time. In coreutils,
+        * accepted data format differs a bit between -d and -t.
+        * We accept the same formats for both */
+       opts = getopt32(argv, "c" IF_DESKTOP("r:d:t:")
                                /*ignored:*/ "fma"
                                IF_DESKTOP(, &reference_file)
                                IF_DESKTOP(, &date_str)
+                               IF_DESKTOP(, &date_str)
        );
 
        opts &= 1; /* only -c bit is left */