]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/hfs/hfs_fsctl.h
xnu-1228.15.4.tar.gz
[apple/xnu.git] / bsd / hfs / hfs_fsctl.h
index 312fce95533fe55739691a907e081ff203bf4aea..fffe15d2614715a8e9546c47b96c876beafa1b76 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
@@ -31,6 +31,7 @@
 
 #include <sys/appleapiopts.h>
 
+#include <sys/param.h>
 #include <sys/ioccom.h>
 #include <sys/time.h>
 
@@ -45,6 +46,9 @@ struct hfs_backingstoreinfo {
 };
 
 
+typedef char pathname_t[MAXPATHLEN];
+
+
 /* HFS FS CONTROL COMMANDS */
 
 #define HFSIOC_RESIZE_PROGRESS  _IOR('h', 1, u_int32_t)
@@ -55,6 +59,10 @@ struct hfs_backingstoreinfo {
 
 #define HFSIOC_CHANGE_NEXT_ALLOCATION  _IOWR('h', 3, u_int32_t)
 #define HFS_CHANGE_NEXT_ALLOCATION  IOCBASECMD(HFSIOC_CHANGE_NEXT_ALLOCATION)
+/* Magic value for next allocation to use with fcntl to set next allocation
+ * to zero and never update it again on new block allocation.
+ */
+#define HFS_NO_UPDATE_NEXT_ALLOCATION  0xffffFFFF
 
 #define HFSIOC_GETCREATETIME  _IOR('h', 4, time_t)
 #define HFS_GETCREATETIME  IOCBASECMD(HFSIOC_GETCREATETIME)
@@ -65,9 +73,31 @@ struct hfs_backingstoreinfo {
 #define HFSIOC_CLRBACKINGSTOREINFO  _IO('h', 8)
 #define HFS_CLRBACKINGSTOREINFO  IOCBASECMD(HFSIOC_CLRBACKINGSTOREINFO)
 
+#define HFSIOC_BULKACCESS _IOW('h', 9, struct access_t)
+#define HFS_BULKACCESS_FSCTL IOCBASECMD(HFSIOC_BULKACCESS)
+
 #define HFSIOC_SETACLSTATE  _IOW('h', 10, int32_t)
 #define HFS_SETACLSTATE  IOCBASECMD(HFSIOC_SETACLSTATE)
 
+#define HFSIOC_PREV_LINK  _IOWR('h', 11, u_int32_t)
+#define HFS_PREV_LINK  IOCBASECMD(HFSIOC_PREV_LINK)
+
+#define HFSIOC_NEXT_LINK  _IOWR('h', 12, u_int32_t)
+#define HFS_NEXT_LINK  IOCBASECMD(HFSIOC_NEXT_LINK)
+
+#define HFSIOC_GETPATH  _IOWR('h', 13, pathname_t)
+#define HFS_GETPATH  IOCBASECMD(HFSIOC_GETPATH)
+
+/* Enable/disable extent-based extended attributes */
+#define HFSIOC_SET_XATTREXTENTS_STATE  _IOW('h', 14, u_int32_t)
+#define HFS_SET_XATTREXTENTS_STATE  IOCBASECMD(HFSIOC_SET_XATTREXTENTS_STATE)
+
+#define HFSIOC_EXT_BULKACCESS _IOW('h', 15, struct ext_access_t)
+#define HFS_EXT_BULKACCESS_FSCTL IOCBASECMD(HFSIOC_EXT_BULKACCESS)
+
+#define HFSIOC_MARK_BOOT_CORRUPT _IO('h', 16)
+#define HFS_MARK_BOOT_CORRUPT IOCBASECMD(HFSIOC_MARK_BOOT_CORRUPT)
+
 #endif /* __APPLE_API_UNSTABLE */