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

Function fat_sector_size

src/fat_common.c:33–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31#include "fat_common.h"
32
33unsigned int fat_sector_size(const struct fat_boot_sector *fat_header)
34{
35 const unsigned int hi=fat_header->sector_size[1];
36 const unsigned int lo=fat_header->sector_size[0];
37 /*@ assert 0 <= hi < 1<<8; */
38 /*@ assert 0 <= hi<<8 < 1<<16; */
39 /*@ assert 0 <= lo < 1<<8; */
40 const unsigned int res=(hi<<8)|lo;
41 /*@ assert res <= 65535; */
42 return res;
43}
44
45unsigned int get_dir_entries(const struct fat_boot_sector *fat_header)
46{

Callers 11

recover_HPFSFunction · 0.85
header_check_fatFunction · 0.85
fat_remove_used_spaceFunction · 0.85
set_FAT_infoFunction · 0.85
log_fat_infoFunction · 0.85
log_fat2_infoFunction · 0.85
test_FATFunction · 0.85
recover_FATFunction · 0.85
fat_dirFunction · 0.85
fat_copyFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_FATFunction · 0.68