]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/sys/fcntl.h
xnu-3789.51.2.tar.gz
[apple/xnu.git] / bsd / sys / fcntl.h
index 2de689085a19c2e05c4f7879f824b05a6c5d221b..0e24d78ce7bca0e3ab985ebaf7bbf4ff242baf43 100644 (file)
 #define F_ADDFILESIGS_RETURN   97      /* Add signature from same file, return end offset in structure on sucess */
 #define F_CHECK_LV             98      /* Check if Library Validation allows this Mach-O file to be mapped into the calling process */
 
+#define F_PUNCHHOLE    99              /* Deallocate a range of the file */
+
+#define F_TRIM_ACTIVE_FILE     100 /* Trim an active file */
 
 // FS-specific fcntl()'s numbers begin at 0x00010000 and go up
 #define FCNTL_FS_SPECIFIC_BASE  0x00010000
@@ -591,7 +594,7 @@ typedef struct user_fchecklv {
 #define        LOCK_NB         0x04            /* don't block when locking */
 #define        LOCK_UN         0x08            /* unlock file */
 
-/*  fstore_t type used by F_DEALLOCATE and F_PREALLOCATE commands */
+/* fstore_t type used by F_PREALLOCATE command */
 
 typedef struct fstore {
        unsigned int fst_flags; /* IN: flags word */
@@ -601,6 +604,20 @@ typedef struct fstore {
        off_t   fst_bytesalloc; /* OUT: number of bytes allocated */
 } fstore_t;
 
+/* fpunchhole_t used by F_PUNCHHOLE */
+typedef struct fpunchhole {
+       unsigned int fp_flags; /* unused */
+       unsigned int reserved; /* (to maintain 8-byte alignment) */
+       off_t fp_offset; /* IN: start of the region */
+       off_t fp_length; /* IN: size of the region */
+} fpunchhole_t;
+
+/* factive_file_trim_t used by F_TRIM_ACTIVE_FILE */
+typedef struct ftrimactivefile {
+       off_t fta_offset;  /* IN: start of the region */
+       off_t fta_length; /* IN: size of the region */
+} ftrimactivefile_t;
+
 /* fbootstraptransfer_t used by F_READBOOTSTRAP and F_WRITEBOOTSTRAP commands */
 
 typedef struct fbootstraptransfer {