]> git.saurik.com Git - apple/xnu.git/blame - bsd/hfs/hfs_mount.h
xnu-1456.1.26.tar.gz
[apple/xnu.git] / bsd / hfs / hfs_mount.h
CommitLineData
1c79356b 1/*
2d21ac55 2 * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
1c79356b 3 *
2d21ac55 4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
1c79356b 5 *
2d21ac55
A
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.
8f6c56a5 14 *
2d21ac55
A
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
8f6c56a5
A
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2d21ac55
A
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.
8f6c56a5 25 *
2d21ac55 26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
1c79356b
A
27 */
28/*
9bccf70c 29 * Copyright (c) 1997-2002 Apple Computer, Inc. All Rights Reserved
1c79356b
A
30 *
31 */
32
33#ifndef _HFS_MOUNT_H_
34#define _HFS_MOUNT_H_
35
9bccf70c
A
36#include <sys/appleapiopts.h>
37
1c79356b
A
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
9bccf70c 51#ifdef __APPLE_API_UNSTABLE
1c79356b 52struct hfs_mount_args {
91447636 53#ifndef KERNEL
1c79356b 54 char *fspec; /* block special device to mount */
91447636 55#endif
1c79356b
A
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) */
2d21ac55 59 u_int32_t hfs_encoding; /* encoding for this volume (standard HFS only) */
1c79356b 60 struct timezone hfs_timezone; /* user time zone info (standard HFS only) */
91447636 61 int flags; /* mounting flags, see below */
b4c24cb9 62 int journal_tbuffer_size; /* size in bytes of the journal transaction buffer */
91447636
A
63 int journal_flags; /* flags to pass to journal_open/create */
64 int journal_disable; /* don't use journaling (potentially dangerous) */
1c79356b
A
65};
66
67#define HFSFSMNT_NOXONFILES 0x1 /* disable execute permissions for files */
9bccf70c 68#define HFSFSMNT_WRAPPER 0x2 /* mount HFS wrapper (if it exists) */
b4c24cb9
A
69#define HFSFSMNT_EXTENDED_ARGS 0x4 /* indicates new fields after "flags" are valid */
70
55e303ae
A
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_ENCODINGHINT 3 /* guess encoding for string */
77#define HFS_ENABLE_JOURNALING 0x082969
78#define HFS_DISABLE_JOURNALING 0x031272
79#define HFS_GET_JOURNAL_INFO 0x6a6e6c69
80#define HFS_SET_PKG_EXTENSIONS 0x121031
2d21ac55 81#define HFS_REPLAY_JOURNAL 0x6a6e6c72
55e303ae 82
9bccf70c 83#endif /* __APPLE_API_UNSTABLE */
1c79356b
A
84
85#endif /* ! _HFS_MOUNT_H_ */