#define O_CLOFORK 0x8000000 /* implicitly set FD_CLOFORK */
#endif
+#ifdef KERNEL
+#define FUNENCRYPTED 0x10000000
+#endif
+
/* Data Protection Flags */
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
#define O_DP_GETRAWENCRYPTED 0x0001
+#define O_DP_GETRAWUNENCRYPTED 0x0002
#endif
*/
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
-#define CPF_OVERWRITE 1
-#define CPF_IGNORE_MODE 2
+#define CPF_OVERWRITE 0x0001
+#define CPF_IGNORE_MODE 0x0002
#define CPF_MASK (CPF_OVERWRITE|CPF_IGNORE_MODE)
#endif
#define F_ADDFILESIGS_FOR_DYLD_SIM 83 /* Add signature from same file, only if it is signed by Apple (used by dyld for simulator) */
+#ifdef PRIVATE
+#define F_RECYCLE 84 /* Recycle vnode; debug/development builds only */
+#endif
+
+#define F_BARRIERFSYNC 85 /* fsync + issue barrier to drive */
+
+#ifdef PRIVATE
+#define F_OFD_SETLK 90 /* Acquire or release open file description lock */
+#define F_OFD_SETLKW 91 /* (as F_OFD_SETLK but blocking if conflicting lock) */
+#define F_OFD_GETLK 92 /* Examine OFD lock */
+
+#define F_OFD_SETLKWTIMEOUT 93 /* (as F_OFD_SETLKW but return if timeout) */
+#define F_OFD_GETLKPID 94 /* get record locking information */
+
+#define F_SETCONFINED 95 /* "confine" OFD to process */
+#define F_GETCONFINED 96 /* is-fd-confined? */
+#endif
+
+#define F_ADDFILESIGS_RETURN 97 /* Add signature from same file, return end offset in structure on sucess */
+
// FS-specific fcntl()'s numbers begin at 0x00010000 and go up
#define FCNTL_FS_SPECIFIC_BASE 0x00010000
#define F_PROV 0x080 /* Non-coalesced provisional lock */
#define F_WAKE1_SAFE 0x100 /* its safe to only wake one waiter */
#define F_ABORT 0x200 /* lock attempt aborted (force umount) */
+#define F_OFD_LOCK 0x400 /* Use "OFD" semantics for lock */
#endif
#if PRIVATE