]> git.saurik.com Git - apple/hfs.git/blob - livefiles_hfs_plugin/lf_hfs_file_extent_mapping.h
hfs-522.0.9.tar.gz
[apple/hfs.git] / livefiles_hfs_plugin / lf_hfs_file_extent_mapping.h
1 //
2 // lf_hfs_file_extent_mapping.h
3 // hfs
4 //
5 // Created by Yakov Ben Zaken on 22/03/2018.
6 //
7
8 #ifndef lf_hfs_file_extent_mapping_h
9 #define lf_hfs_file_extent_mapping_h
10
11 /* File Extent Mapping routines*/
12 OSErr FlushExtentFile( ExtendedVCB *vcb );
13
14 int32_t CompareExtentKeysPlus( const HFSPlusExtentKey *searchKey, const HFSPlusExtentKey *trialKey );
15
16 OSErr SearchExtentFile( ExtendedVCB *vcb,
17 const FCB *fcb,
18 int64_t filePosition,
19 HFSPlusExtentKey *foundExtentKey,
20 HFSPlusExtentRecord foundExtentData,
21 u_int32_t *foundExtentDataIndex,
22 u_int32_t *extentBTreeHint,
23 u_int32_t *endingFABNPlusOne );
24
25 OSErr TruncateFileC( ExtendedVCB *vcb,
26 FCB *fcb,
27 int64_t peof,
28 int deleted,
29 int rsrc,
30 uint32_t fileid,
31 Boolean truncateToExtent );
32
33 OSErr ExtendFileC( ExtendedVCB *vcb,
34 FCB *fcb,
35 int64_t bytesToAdd,
36 u_int32_t blockHint,
37 u_int32_t flags,
38 int64_t *actualBytesAdded );
39
40 OSErr MapFileBlockC( ExtendedVCB *vcb,
41 FCB *fcb,
42 size_t numberOfBytes,
43 off_t offset,
44 daddr64_t *startBlock,
45 size_t *availableBytes );
46
47 OSErr HeadTruncateFile( ExtendedVCB *vcb,
48 FCB *fcb,
49 u_int32_t headblks );
50
51 int AddFileExtent( ExtendedVCB *vcb,
52 FCB *fcb,
53 u_int32_t startBlock,
54 u_int32_t blockCount );
55
56 Boolean NodesAreContiguous( ExtendedVCB *vcb,
57 FCB *fcb,
58 u_int32_t nodeSize );
59
60 #endif /* lf_hfs_file_extent_mapping_h */