]> git.saurik.com Git - apple/xnu.git/blob - bsd/hfs/hfs_mount.h
xnu-792.6.56.tar.gz
[apple/xnu.git] / bsd / hfs / hfs_mount.h
1 /*
2 * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_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. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23 /*
24 * Copyright (c) 1997-2002 Apple Computer, Inc. All Rights Reserved
25 *
26 */
27
28 #ifndef _HFS_MOUNT_H_
29 #define _HFS_MOUNT_H_
30
31 #include <sys/appleapiopts.h>
32
33 #include <sys/mount.h>
34 #include <sys/time.h>
35
36 /*
37 * Arguments to mount HFS-based filesystems
38 */
39
40 #define OVERRIDE_UNKNOWN_PERMISSIONS 0
41
42 #define UNKNOWNUID ((uid_t)99)
43 #define UNKNOWNGID ((gid_t)99)
44 #define UNKNOWNPERMISSIONS (S_IRWXU | S_IROTH | S_IXOTH) /* 705 */
45
46 #ifdef __APPLE_API_UNSTABLE
47 struct hfs_mount_args {
48 #ifndef KERNEL
49 char *fspec; /* block special device to mount */
50 #endif
51 uid_t hfs_uid; /* uid that owns hfs files (standard HFS only) */
52 gid_t hfs_gid; /* gid that owns hfs files (standard HFS only) */
53 mode_t hfs_mask; /* mask to be applied for hfs perms (standard HFS only) */
54 uint32_t hfs_encoding; /* encoding for this volume (standard HFS only) */
55 struct timezone hfs_timezone; /* user time zone info (standard HFS only) */
56 int flags; /* mounting flags, see below */
57 int journal_tbuffer_size; /* size in bytes of the journal transaction buffer */
58 int journal_flags; /* flags to pass to journal_open/create */
59 int journal_disable; /* don't use journaling (potentially dangerous) */
60 };
61
62 #define HFSFSMNT_NOXONFILES 0x1 /* disable execute permissions for files */
63 #define HFSFSMNT_WRAPPER 0x2 /* mount HFS wrapper (if it exists) */
64 #define HFSFSMNT_EXTENDED_ARGS 0x4 /* indicates new fields after "flags" are valid */
65
66 /*
67 * Sysctl values for HFS
68 */
69 #define HFS_ENCODINGBIAS 1 /* encoding matching CJK bias */
70 #define HFS_EXTEND_FS 2
71 #define HFS_ENCODINGHINT 3 /* guess encoding for string */
72 #define HFS_ENABLE_JOURNALING 0x082969
73 #define HFS_DISABLE_JOURNALING 0x031272
74 #define HFS_GET_JOURNAL_INFO 0x6a6e6c69
75 #define HFS_SET_PKG_EXTENSIONS 0x121031
76
77 #endif /* __APPLE_API_UNSTABLE */
78
79 #endif /* ! _HFS_MOUNT_H_ */