]> git.saurik.com Git - apple/hfs.git/blame - livefiles_hfs_plugin/lf_hfs_mount.h
hfs-522.100.5.tar.gz
[apple/hfs.git] / livefiles_hfs_plugin / lf_hfs_mount.h
CommitLineData
de8ee011
A
1/* Copyright © 2017-2018 Apple Inc. All rights reserved.
2 *
3 * lf_hfs_mount.h
4 * livefiles_hfs
5 *
6 * Created by Or Haimovich on 18/3/18.
7 */
8
9#ifndef lf_hfs_mount_h
10#define lf_hfs_mount_h
11
12#include <sys/time.h>
13
14/*
15 * Arguments to mount HFS-based filesystems
16 */
17
18#define OVERRIDE_UNKNOWN_PERMISSIONS 0
19
20#define UNKNOWNUID ((uid_t)99)
21#define UNKNOWNGID ((gid_t)99)
22#define UNKNOWNPERMISSIONS (S_IRWXU | S_IROTH | S_IXOTH) /* 705 */
23
24struct hfs_mount_args {
25 char *fspec; /* block special device to mount */
26 uid_t hfs_uid; /* uid that owns hfs files (standard HFS only) */
27 gid_t hfs_gid; /* gid that owns hfs files (standard HFS only) */
28 mode_t hfs_mask; /* mask to be applied for hfs perms (standard HFS only) */
29 u_int32_t hfs_encoding; /* encoding for this volume (standard HFS only) */
30 struct timezone hfs_timezone; /* user time zone info (standard HFS only) */
31 int flags; /* mounting flags, see below */
32 int journal_tbuffer_size; /* size in bytes of the journal transaction buffer */
33 int journal_flags; /* flags to pass to journal_open/create */
34 int journal_disable; /* don't use journaling (potentially dangerous) */
35};
36
37#define HFSFSMNT_NOXONFILES 0x1 /* disable execute permissions for files */
38#define HFSFSMNT_WRAPPER 0x2 /* mount HFS wrapper (if it exists) */
39#define HFSFSMNT_EXTENDED_ARGS 0x4 /* indicates new fields after "flags" are valid */
40
41/*
42 * User specifiable flags.
43 *
44 * Unmount uses MNT_FORCE flag.
45 */
46#define MNT_RDONLY 0x00000001 /* read only filesystem */
47#define MNT_SYNCHRONOUS 0x00000002 /* file system written synchronously */
48#define MNT_NOEXEC 0x00000004 /* can't exec from filesystem */
49#define MNT_NOSUID 0x00000008 /* don't honor setuid bits on fs */
50#define MNT_NODEV 0x00000010 /* don't interpret special files */
51#define MNT_UNION 0x00000020 /* union with underlying filesystem */
52#define MNT_ASYNC 0x00000040 /* file system written asynchronously */
53#define MNT_CPROTECT 0x00000080 /* file system supports content protection */
54
55#define MNT_LOCAL 0x00001000 /* filesystem is stored locally */
56#define MNT_QUOTA 0x00002000 /* quotas are enabled on filesystem */
57#define MNT_ROOTFS 0x00004000 /* identifies the root filesystem */
58#define MNT_DOVOLFS 0x00008000 /* FS supports volfs (deprecated flag in Mac OS X 10.5) */
59
60#define MNT_DONTBROWSE 0x00100000 /* file system is not appropriate path to user data */
61#define MNT_IGNORE_OWNERSHIP 0x00200000 /* VFS will ignore ownership information on filesystem objects */
62#define MNT_AUTOMOUNTED 0x00400000 /* filesystem was mounted by automounter */
63#define MNT_JOURNALED 0x00800000 /* filesystem is journaled */
64#define MNT_NOUSERXATTR 0x01000000 /* Don't allow user extended attributes */
65#define MNT_DEFWRITE 0x02000000 /* filesystem should defer writes */
66#define MNT_MULTILABEL 0x04000000 /* MAC support for individual labels */
67#define MNT_NOATIME 0x10000000 /* disable update of file access time */
68#define MNT_SNAPSHOT 0x40000000 /* The mount is a snapshot */
69
70
71#endif /* lf_hfs_mount_h */