]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: provide UTIME_NOW|OMIT defines under our own namespace
authorRalph Boehme <slow@samba.org>
Wed, 27 Nov 2019 11:28:30 +0000 (11:28 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 6 Dec 2019 00:17:35 +0000 (00:17 +0000)
We may want to add additional defines in the future in order to deal with
NTTIME(-1) and NTTIME(-2) coming in over the wire. They have special semantics
attached to them, -1 requests "no automatic write time updates" on a filehandle
and -2 reenables them.

We could use something like

  #define SAMBA_UTIME_FREEZE (SAMBA_UTIME_OMIT - 1)
  #define SAMBA_UTIME_THAW (SAMBA_UTIME_FREEZE - 1)

in the future.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7771

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/time.h

index 7a8f8af35d98286c160f4dc8d945bd6212a978c1..d03dc4908f3f34f55fbee8dd4dd77f43d48ec12c 100644 (file)
@@ -41,6 +41,8 @@
 #define TIME_T_MAX MIN(INT32_MAX,_TYPE_MAXIMUM(time_t))
 #endif
 
+#define SAMBA_UTIME_NOW UTIME_NOW
+#define SAMBA_UTIME_OMIT UTIME_OMIT
 
 /* 64 bit time (100 nanosec) 1601 - cifs6.txt, section 3.5, page 30, 4 byte aligned */
 typedef uint64_t NTTIME;