]> git.saurik.com Git - apple/xnu.git/blob - bsd/hfs/hfs_fsctl.h
xnu-1228.5.20.tar.gz
[apple/xnu.git] / bsd / hfs / hfs_fsctl.h
1 /*
2 * Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28
29 #ifndef _HFS_FSCTL_H_
30 #define _HFS_FSCTL_H_
31
32 #include <sys/appleapiopts.h>
33
34 #include <sys/param.h>
35 #include <sys/ioccom.h>
36 #include <sys/time.h>
37
38
39 #ifdef __APPLE_API_UNSTABLE
40
41 struct hfs_backingstoreinfo {
42 int signature; /* == 3419115 */
43 int version; /* version of this struct (1) */
44 int backingfd; /* disk image file (on backing fs) */
45 int bandsize; /* sparse disk image band size */
46 };
47
48
49 typedef char pathname_t[MAXPATHLEN];
50
51
52 /* HFS FS CONTROL COMMANDS */
53
54 #define HFSIOC_RESIZE_PROGRESS _IOR('h', 1, u_int32_t)
55 #define HFS_RESIZE_PROGRESS IOCBASECMD(HFSIOC_RESIZE_PROGRESS)
56
57 #define HFSIOC_RESIZE_VOLUME _IOW('h', 2, u_int64_t)
58 #define HFS_RESIZE_VOLUME IOCBASECMD(HFSIOC_RESIZE_VOLUME)
59
60 #define HFSIOC_CHANGE_NEXT_ALLOCATION _IOWR('h', 3, u_int32_t)
61 #define HFS_CHANGE_NEXT_ALLOCATION IOCBASECMD(HFSIOC_CHANGE_NEXT_ALLOCATION)
62 /* Magic value for next allocation to use with fcntl to set next allocation
63 * to zero and never update it again on new block allocation.
64 */
65 #define HFS_NO_UPDATE_NEXT_ALLOCATION 0xffffFFFF
66
67 #define HFSIOC_GETCREATETIME _IOR('h', 4, time_t)
68 #define HFS_GETCREATETIME IOCBASECMD(HFSIOC_GETCREATETIME)
69
70 #define HFSIOC_SETBACKINGSTOREINFO _IOW('h', 7, struct hfs_backingstoreinfo)
71 #define HFS_SETBACKINGSTOREINFO IOCBASECMD(HFSIOC_SETBACKINGSTOREINFO)
72
73 #define HFSIOC_CLRBACKINGSTOREINFO _IO('h', 8)
74 #define HFS_CLRBACKINGSTOREINFO IOCBASECMD(HFSIOC_CLRBACKINGSTOREINFO)
75
76 #define HFSIOC_BULKACCESS _IOW('h', 9, struct access_t)
77 #define HFS_BULKACCESS_FSCTL IOCBASECMD(HFSIOC_BULKACCESS)
78
79 #define HFSIOC_SETACLSTATE _IOW('h', 10, int32_t)
80 #define HFS_SETACLSTATE IOCBASECMD(HFSIOC_SETACLSTATE)
81
82 #define HFSIOC_PREV_LINK _IOWR('h', 11, u_int32_t)
83 #define HFS_PREV_LINK IOCBASECMD(HFSIOC_PREV_LINK)
84
85 #define HFSIOC_NEXT_LINK _IOWR('h', 12, u_int32_t)
86 #define HFS_NEXT_LINK IOCBASECMD(HFSIOC_NEXT_LINK)
87
88 #define HFSIOC_GETPATH _IOWR('h', 13, pathname_t)
89 #define HFS_GETPATH IOCBASECMD(HFSIOC_GETPATH)
90
91 /* Enable/disable extent-based extended attributes */
92 #define HFSIOC_SET_XATTREXTENTS_STATE _IOW('h', 14, u_int32_t)
93 #define HFS_SET_XATTREXTENTS_STATE IOCBASECMD(HFSIOC_SET_XATTREXTENTS_STATE)
94
95 #define HFSIOC_EXT_BULKACCESS _IOW('h', 15, struct ext_access_t)
96 #define HFS_EXT_BULKACCESS_FSCTL IOCBASECMD(HFSIOC_EXT_BULKACCESS)
97
98 #define HFSIOC_MARK_BOOT_CORRUPT _IO('h', 16)
99 #define HFS_MARK_BOOT_CORRUPT IOCBASECMD(HFSIOC_MARK_BOOT_CORRUPT)
100
101 #endif /* __APPLE_API_UNSTABLE */
102
103
104 #endif /* ! _HFS_FSCTL_H_ */