]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
touch: Allow setting the timestamp to -1.
authorDag-Erling Smørgrav <des@FreeBSD.org>
Wed, 27 Mar 2024 10:03:40 +0000 (11:03 +0100)
committerDag-Erling Smørgrav <des@FreeBSD.org>
Wed, 27 Mar 2024 10:03:40 +0000 (11:03 +0100)
commitaa69e0f212630bd6d4ec1c3c54e117be16653e8a
treed3bb1c025980933c2232b9095050ab901d0c8ef2
parent7534109d13a6cdb22e78d9d4c0a0cd5efd323c45
touch: Allow setting the timestamp to -1.

Note that VFS internally interprets a timestamp of -1 as “do not set”,
so this has no effect, but at least touch won't incorrectly reject the
given date / time (1969-12-31 23:59:59 UTC) as invalid.

While here, fix some style issues.

MFC after: 1 week
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D44504
usr.bin/touch/touch.c