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