MCPcopy Create free account
hub / github.com/cgsecurity/testdisk / td_ext2fs_blocks_count

Function td_ext2fs_blocks_count

src/ext2_common.c:37–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35#include "ext2_common.h"
36
37uint64_t td_ext2fs_blocks_count(const struct ext2_super_block *super)
38{
39 const uint64_t lo=le32(super->s_blocks_count);
40 const uint64_t hi=le32(super->s_blocks_count_hi);
41 /*@ assert lo < 1 << 32; */
42 /*@ assert hi < 1 << 32; */
43 /*@ assert hi << 32 < (1 << 64); */
44 return lo |
45 (EXT2_HAS_INCOMPAT_FEATURE(super, EXT4_FEATURE_INCOMPAT_64BIT) ?
46 hi << 32 : 0);
47}
48
49uint64_t td_ext2fs_free_blocks_count(const struct ext2_super_block *super)
50{

Callers 2

recover_EXT2Function · 0.85
test_EXT2Function · 0.85

Calls

no outgoing calls

Tested by 1

test_EXT2Function · 0.68