freebsd-src/usr.bin/touch
Dag-Erling Smørgrav fc72874563 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

(cherry picked from commit aa69e0f212)

touch: Add unit tests.

MFC after:	1 week
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D44505

(cherry picked from commit 74a4aa9b15)
2024-04-04 11:51:04 +02:00
..
tests touch: Allow setting the timestamp to -1. 2024-04-04 11:51:04 +02:00
Makefile touch: Allow setting the timestamp to -1. 2024-04-04 11:51:04 +02:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
touch.1 Remove $FreeBSD$: one-line nroff pattern 2023-08-23 11:43:32 -06:00
touch.c touch: Allow setting the timestamp to -1. 2024-04-04 11:51:04 +02:00