]> git.saurik.com Git - apple/hfs.git/blob - livefiles_hfs_plugin/lf_hfs_raw_read_write.h
hfs-522.0.9.tar.gz
[apple/hfs.git] / livefiles_hfs_plugin / lf_hfs_raw_read_write.h
1 /* Copyright © 2017-2018 Apple Inc. All rights reserved.
2 *
3 * lf_hfs_raw_read_write.h
4 * livefiles_hfs
5 *
6 * Created by Or Haimovich on 19/3/18.
7 */
8
9 #ifndef lf_hfs_raw_read_write_h
10 #define lf_hfs_raw_read_write_h
11
12 #include "lf_hfs_vnode.h"
13 #include "lf_hfs.h"
14
15 errno_t raw_readwrite_read_mount( vnode_t psMountVnode, uint64_t uBlockN, uint64_t uClusterSize, void* pvBuf, uint64_t uBufLen, uint64_t *piActuallyRead, uint64_t* puReadStartCluster );
16 errno_t raw_readwrite_write_mount( vnode_t psMountVnode, uint64_t uBlockN, uint64_t uClusterSize, void* pvBuf, uint64_t uBufLen, uint64_t *piActuallyWritten, uint64_t* puWrittenStartCluster );
17
18 int raw_readwrite_get_cluster_from_offset( vnode_t psVnode, uint64_t uWantedOffset, uint64_t* puStartCluster, uint64_t* puInClusterOffset, uint64_t* puContigousClustersInBytes );
19 errno_t raw_readwrite_write( vnode_t psVnode, uint64_t uOffset, void* pvBuf, uint64_t uLength, uint64_t *piActuallyWritten );
20 errno_t raw_readwrite_write_internal( vnode_t psVnode, uint64_t uCluster, uint64_t uContigousClustersInBytes,
21 uint64_t Offset, uint64_t uBytesToWrite, void* pvBuf, uint64_t *piActuallyWritten );
22 errno_t raw_readwrite_read( vnode_t psVnode, uint64_t uOffset, void* pvBuf, uint64_t uLength, size_t *piActuallyRead, uint64_t* puReadStartCluster );
23 errno_t raw_readwrite_read_internal( vnode_t psVnode, uint64_t uStartCluster, uint64_t uContigousClustersInBytes,
24 uint64_t Offset, uint64_t uBytesToRead, void* pvBuf, uint64_t *piActuallyRead );
25
26 int raw_readwrite_zero_fill_init( void );
27 void raw_readwrite_zero_fill_de_init( void );
28 int raw_readwrite_zero_fill_fill( hfsmount_t* psMount, uint64_t uOffset, uint32_t uLength );
29 errno_t raw_readwrite_zero_fill_last_block_suffix( vnode_t psVnode );
30
31
32 #endif /* lf_hfs_raw_read_write_h */