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

Function check_BeFS

src/bfs.c:63–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61
62
63int check_BeFS(disk_t *disk_car,partition_t *partition)
64{
65 unsigned char *buffer;
66 buffer=(unsigned char*)MALLOC(BFS_SUPERBLOCK_SIZE);
67 if(disk_car->pread(disk_car, buffer, BFS_SUPERBLOCK_SIZE, partition->part_offset + 0x200) != BFS_SUPERBLOCK_SIZE)
68 {
69 free(buffer);
70 return 1;
71 }
72 if(test_BeFS(disk_car,(struct disk_super_block*)buffer,partition,0)!=0)
73 {
74 free(buffer);
75 return 1;
76 }
77 set_BeFS_info((struct disk_super_block*)buffer, partition);
78 free(buffer);
79 return 0;
80}
81
82int recover_BeFS(const disk_t *disk_car, const struct disk_super_block *beos_block, partition_t *partition, const int dump_ind)
83{

Callers 3

check_part_gptFunction · 0.85
check_part_noneFunction · 0.85
check_part_i386Function · 0.85

Calls 3

MALLOCFunction · 0.85
test_BeFSFunction · 0.85
set_BeFS_infoFunction · 0.85

Tested by

no test coverage detected