]> git.saurik.com Git - apple/hfs.git/blame - livefiles_hfs_plugin/lf_hfs_attrlist.h
hfs-556.100.11.tar.gz
[apple/hfs.git] / livefiles_hfs_plugin / lf_hfs_attrlist.h
CommitLineData
de8ee011
A
1/* Copyright © 2017-2018 Apple Inc. All rights reserved.
2 *
3 * lf_hfs_attrlist.h
4 * livefiles_hfs
5 *
6 * Created by Or Haimovich on 25/3/18.
7 */
8
9#ifndef lf_hfs_attrlist_h
10#define lf_hfs_attrlist_h
11
12#include <sys/attr.h>
13
14#include "lf_hfs_catalog.h"
15#include "lf_hfs_vnode.h"
16/*
17 * The following define the attributes that HFS supports:
18 */
19
20typedef struct
21{
22 scandir_matching_request_t* psMatchingCriteria;
23 scandir_matching_reply_t* psMatchingResult;
24} ScanDirRequest_s;
25
26#define HFS_ATTR_CMN_VALID (ATTR_CMN_NAME | ATTR_CMN_DEVID | \
27 ATTR_CMN_FSID | ATTR_CMN_OBJTYPE | \
28 ATTR_CMN_OBJTAG | ATTR_CMN_OBJID | \
29 ATTR_CMN_OBJPERMANENTID | ATTR_CMN_PAROBJID | \
30 ATTR_CMN_SCRIPT | ATTR_CMN_CRTIME | \
31 ATTR_CMN_MODTIME | ATTR_CMN_CHGTIME | \
32 ATTR_CMN_ACCTIME | ATTR_CMN_BKUPTIME | \
33 ATTR_CMN_FNDRINFO |ATTR_CMN_OWNERID | \
34 ATTR_CMN_GRPID | ATTR_CMN_ACCESSMASK | \
35 ATTR_CMN_FLAGS | ATTR_CMN_USERACCESS | \
36 ATTR_CMN_FILEID | ATTR_CMN_PARENTID )
37
38#define HFS_ATTR_CMN_SEARCH_VALID (ATTR_CMN_NAME | ATTR_CMN_OBJID | \
39 ATTR_CMN_PAROBJID | ATTR_CMN_CRTIME | \
40 ATTR_CMN_MODTIME | ATTR_CMN_CHGTIME | \
41 ATTR_CMN_ACCTIME | ATTR_CMN_BKUPTIME | \
42 ATTR_CMN_FNDRINFO | ATTR_CMN_OWNERID | \
43 ATTR_CMN_GRPID | ATTR_CMN_ACCESSMASK | \
44 ATTR_CMN_FILEID | ATTR_CMN_PARENTID )
45
46#define HFS_ATTR_DIR_VALID (ATTR_DIR_LINKCOUNT | ATTR_DIR_ENTRYCOUNT | ATTR_DIR_MOUNTSTATUS)
47
48#define HFS_ATTR_DIR_SEARCH_VALID (ATTR_DIR_ENTRYCOUNT)
49
50#define HFS_ATTR_FILE_VALID (ATTR_FILE_LINKCOUNT |ATTR_FILE_TOTALSIZE | \
51 ATTR_FILE_ALLOCSIZE | ATTR_FILE_IOBLOCKSIZE | \
52 ATTR_FILE_CLUMPSIZE | ATTR_FILE_DEVTYPE | \
53 ATTR_FILE_DATALENGTH | ATTR_FILE_DATAALLOCSIZE | \
54 ATTR_FILE_RSRCLENGTH | ATTR_FILE_RSRCALLOCSIZE)
55
56#define HFS_ATTR_FILE_SEARCH_VALID (ATTR_FILE_DATALENGTH | ATTR_FILE_DATAALLOCSIZE | \
57 ATTR_FILE_RSRCLENGTH | ATTR_FILE_RSRCALLOCSIZE )
58
59int hfs_readdirattr_internal(struct vnode *dvp, ReadDirBuff_s* psReadDirBuffer, int maxcount, uint32_t *newstate, int *eofflag, int *actualcount, uint64_t uCookie);
60int hfs_scandir(struct vnode *dvp, ScanDirRequest_s* psScanDirRequest);
61#endif /* lf_hfs_attrlist_h */