]> git.saurik.com Git - apple/hfs.git/blob - livefiles_hfs_plugin/lf_hfs_vfsops.h
hfs-522.0.9.tar.gz
[apple/hfs.git] / livefiles_hfs_plugin / lf_hfs_vfsops.h
1 /* Copyright © 2017-2018 Apple Inc. All rights reserved.
2 *
3 * lf_hfs_vfsops.h
4 * livefiles_hfs
5 *
6 * Created by Yakov Ben Zaken on 20/03/2018.
7 */
8
9 #ifndef lf_hfs_vfsops_h
10 #define lf_hfs_vfsops_h
11
12 #include "lf_hfs.h"
13 #include "lf_hfs_dirops_handler.h"
14
15 typedef enum {
16 // HFS_FVH_WAIT = 0x0001, // Livefiles always waits for non-journal volume header writes.
17 HFS_FVH_WRITE_ALT = 0x0002,
18 HFS_FVH_FLUSH_IF_DIRTY = 0x0004,
19 HFS_FVH_MARK_UNMOUNT = 0x0008,
20 HFS_FVH_SKIP_TRANSACTION = 0x0010, // This volume flush is called from within an hfs-transaction
21 } hfs_flush_volume_header_options_t;
22
23 enum volop{
24 VOL_UPDATE,
25 VOL_MKDIR,
26 VOL_RMDIR,
27 VOL_MKFILE,
28 VOL_RMFILE
29 };
30
31 void hfs_mark_inconsistent(struct hfsmount *hfsmp, hfs_inconsistency_reason_t reason);
32 int hfs_flushvolumeheader(struct hfsmount *hfsmp, hfs_flush_volume_header_options_t options);
33 int hfs_mount(struct mount *mp, vnode_t devvp, user_addr_t data);
34 int hfs_ScanVolGetVolName(int iFd, char* pcVolumeName);
35 void hfs_getvoluuid(struct hfsmount *hfsmp, uuid_t result_uuid);
36 void hfs_scan_blocks (struct hfsmount *hfsmp);
37 int hfs_vfs_root(struct mount *mp, struct vnode **vpp);
38 int hfs_unmount(struct mount *mp);
39 void hfs_setencodingbits(struct hfsmount *hfsmp, u_int32_t encoding);
40 int hfs_volupdate(struct hfsmount *hfsmp, enum volop op, int inroot);
41 int hfs_vget(struct hfsmount *hfsmp, cnid_t cnid, struct vnode **vpp, int skiplock, int allow_deleted);
42 int hfs_GetInfoByID(struct hfsmount *hfsmp, cnid_t cnid, UVFSFileAttributes *file_attrs, char pcName[MAX_UTF8_NAME_LENGTH]);
43 int fsck_hfs(int fd, check_flags_t how);
44 #endif /* lf_hfs_vfsops_h */