]> git.saurik.com Git - apple/hfs.git/blob - core/hfs_mount.h
abbe61a7cc1ac52ca35a5f5b733080be579bc15f
[apple/hfs.git] / core / hfs_mount.h
1 /*
2 * Copyright (c) 2000-2015 Apple 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 * Copyright (c) 1997-2002 Apple Inc. All Rights Reserved
30 *
31 */
32
33 #ifndef _HFS_MOUNT_H_
34 #define _HFS_MOUNT_H_
35
36 #include <sys/appleapiopts.h>
37
38 #include <sys/mount.h>
39 #include <sys/time.h>
40
41 /*
42 * Arguments to mount HFS-based filesystems
43 */
44
45 #define OVERRIDE_UNKNOWN_PERMISSIONS 0
46
47 #define UNKNOWNUID ((uid_t)99)
48 #define UNKNOWNGID ((gid_t)99)
49 #define UNKNOWNPERMISSIONS (S_IRWXU | S_IROTH | S_IXOTH) /* 705 */
50
51 #ifdef __APPLE_API_UNSTABLE
52 struct hfs_mount_args {
53 #ifndef KERNEL
54 char *fspec; /* block special device to mount */
55 #endif
56 uid_t hfs_uid; /* uid that owns hfs files (standard HFS only) */
57 gid_t hfs_gid; /* gid that owns hfs files (standard HFS only) */
58 mode_t hfs_mask; /* mask to be applied for hfs perms (standard HFS only) */
59 u_int32_t hfs_encoding; /* encoding for this volume (standard HFS only) */
60 struct timezone hfs_timezone; /* user time zone info (standard HFS only) */
61 int flags; /* mounting flags, see below */
62 int journal_tbuffer_size; /* size in bytes of the journal transaction buffer */
63 int journal_flags; /* flags to pass to journal_open/create */
64 int journal_disable; /* don't use journaling (potentially dangerous) */
65 };
66
67 #define HFSFSMNT_NOXONFILES 0x1 /* disable execute permissions for files */
68 #define HFSFSMNT_WRAPPER 0x2 /* mount HFS wrapper (if it exists) */
69 #define HFSFSMNT_EXTENDED_ARGS 0x4 /* indicates new fields after "flags" are valid */
70
71 /*
72 * Sysctl values for HFS
73 */
74 #define HFS_ENCODINGBIAS 1 /* encoding matching CJK bias */
75 #define HFS_EXTEND_FS 2
76 #define HFS_ENABLE_JOURNALING 0x082969
77 #define HFS_DISABLE_JOURNALING 0x031272
78 #define HFS_REPLAY_JOURNAL 0x6a6e6c72
79 #define HFS_ENABLE_RESIZE_DEBUG 4 /* enable debug code for volume resizing */
80
81 #endif /* __APPLE_API_UNSTABLE */
82
83 #endif /* ! _HFS_MOUNT_H_ */