#include <sys/fcntl.h>
sys/fcntl.h Kernel.framework
27 macros · 6 structs · 5 typedefs
#define FDEFER 0x00002000
defer for next gc pass, same value as
O_UNIQUE#define FWASLOCKED 0x00004000
has or has had an advisory fcntl lock
#define FHASLOCK FWASLOCKED
obsolete compatibility name
#define FWASWRITTEN 0x00010000
descriptor was written
#define FNOCACHE 0x00040000
#define FNORDAHEAD 0x00080000
#define FNODIRECT 0x00800000
#define FENCRYPTED 0x02000000
#define FSINGLE_WRITER 0x04000000
#define O_CLOFORK 0x08000000
implicitly set FD_CLOFORK
#define FUNENCRYPTED 0x10000000
#define FFLAGS(oflags) (((oflags) & O_EXEC) ? ((oflags) & ~(O_ACCMODE)) : ((oflags) + 1))
There is no way to convey a lack of
O_RDONLY but the presence of
O_EXEC means that
#define OFLAGS(fflags) (((fflags) & FEXEC) ? ((fflags) & ~(O_ACCMODE)) : ((fflags) - 1))
#define F_WAIT 0x010
Wait until lock is granted
#define F_FLOCK 0x020
Use flock(2) semantics for lock
#define F_POSIX 0x040
Use POSIX semantics for lock
#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
#define F_TRANSFER 0x800
Transfer the lock to new proc
#define F_CONFINED 0x1000
fileglob cannot leave curproc
size 56, align 8
| off_t | fs_file_start | offset of Mach-O image in FAT file |
| user_addr_t | fs_blob_start | F_ADDSIGS: mem address of signature |
| user_size_t | fs_blob_size | F_ADDFILESIGS: offset of signature
in Mach-O image size of signature blob |
| user_size_t | fs_fsignatures_size | The following fields are only applicable to F_ADDFILESIGS_INFO.
Prior to F_ADDFILESIGS_INFO, this struct ended after fs_blob_size. input: size of this struct (for compatibility) |
| char[20] | fs_cdhash | output: cdhash |
| int | fs_hash_type | output: hash algorithm type for cdhash |
size 32, align 8
| off_t | fs_file_start | offset of Mach-O image in FAT file |
| off_t | fs_blob_start | offset of signature in Mach-O image |
| size_t | fs_blob_size | signature blob size |
| int | fs_orig_fd | file descriptor to original image |