diff options
author | Elliott Hughes <enh@google.com> | 2018-11-13 13:34:21 -0800 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2018-11-13 15:49:10 -0600 |
commit | d54fac979ef9f96a64dcce2e3876b97dfcc5a25d (patch) | |
tree | 7e16dd3fe17053dec7db013f76838b82ee3d96da /toys | |
parent | 9fb36217ced80914f0bc03599212da07c0b6dfd9 (diff) | |
download | toybox-d54fac979ef9f96a64dcce2e3876b97dfcc5a25d.tar.gz |
touch: ignore -f like everyone else.
I assume it's actually meaningful on BSD/macOS and makes them behave
like us, but I don't have access to a Mac to test that theory.
Diffstat (limited to 'toys')
-rw-r--r-- | toys/posix/touch.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/toys/posix/touch.c b/toys/posix/touch.c index 5e5588b1..6a07ff33 100644 --- a/toys/posix/touch.c +++ b/toys/posix/touch.c @@ -3,8 +3,11 @@ * Copyright 2012 Choubey Ji <warior.linux@gmail.com> * * See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/touch.html + * + * -f is ignored for BSD/macOS compatibility. busybox/coreutils also support + * this, but only coreutils documents it in --help output. -USE_TOUCH(NEWTOY(touch, "<1acd:mr:t:h[!dtr]", TOYFLAG_BIN)) +USE_TOUCH(NEWTOY(touch, "<1acd:fmr:t:h[!dtr]", TOYFLAG_BIN)) config TOUCH bool "touch" |