summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/utimes.2
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2002-07-17 02:03:19 +0000
committermckusick <mckusick@FreeBSD.org>2002-07-17 02:03:19 +0000
commit3abb526f86a27b005f352fb91f605228876fa8f7 (patch)
tree5b5d1d91499a541486f56f84b49c10edeafd66b2 /lib/libc/sys/utimes.2
parent9498a983a938cec96851b64642f0b62bba7d1827 (diff)
downloadFreeBSD-src-3abb526f86a27b005f352fb91f605228876fa8f7.zip
FreeBSD-src-3abb526f86a27b005f352fb91f605228876fa8f7.tar.gz
Change utimes to set the file creation time (for filesystems that
support creation times such as UFS2) to the value of the modification time if the value of the modification time is older than the current creation time. See utimes(2) for further details. Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'lib/libc/sys/utimes.2')
-rw-r--r--lib/libc/sys/utimes.29
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libc/sys/utimes.2 b/lib/libc/sys/utimes.2
index 5d9691f..3c28302 100644
--- a/lib/libc/sys/utimes.2
+++ b/lib/libc/sys/utimes.2
@@ -75,6 +75,15 @@ is
it is assumed to point to an array of two timeval structures.
The access time is set to the value of the first element, and the
modification time is set to the value of the second element.
+For filesystems that support file birth (creation) times (such as
+.Dv UFS2 ),
+the birth time will be set to the value of the second element
+if the second element is older than the currently set birth time.
+To set both a birth time and a modification time,
+two calls are required; the first to set the birth time
+and the second to set the (presumably newer) modification time.
+Ideally a new system call will be added that allows the setting
+of all three times at once.
The caller must be the owner of the file or be the super-user.
.Pp
In either case, the inode-change-time of the file is set to the current
OpenPOWER on IntegriCloud