]>
git.saurik.com Git - apple/hfs.git/blob - livefiles_hfs_plugin/lf_hfs_utils.h
1 /* Copyright © 2017-2018 Apple Inc. All rights reserved.
6 * Created by Yakov Ben Zaken on 19/03/2018.
10 #define lf_hfs_utils_h
14 #include "lf_hfs_locks.h"
16 #include "lf_hfs_logger.h"
18 #define hfs_assert(expr) \
20 if ( (expr) == (0) ) \
22 LFHFS_LOG( LEVEL_ERROR, \
23 "HFS ASSERT [%s] [%d]\n", \
30 #define MAC_GMT_FACTOR 2082844800UL
33 void* hashinit(int elements
, u_long
*hashmask
);
34 void hashDeinit(void* pvHashTbl
);
35 time_t to_bsd_time(u_int32_t hfs_time
);
36 u_int32_t
to_hfs_time(time_t bsd_time
);
37 void microuptime(struct timeval
*tvp
);
38 void microtime(struct timeval
*tvp
);
39 void* lf_hfs_utils_allocate_and_copy_string( char *pcName
, size_t uLen
);
40 off_t
blk_to_bytes(uint32_t blk
, uint32_t blk_size
);
42 #endif /* lf_hfs_utils_h */