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

Function test_BeFS

src/bfs.c:46–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46static int test_BeFS(const disk_t *disk_car, const struct disk_super_block*beos_block, const partition_t *partition, const int dump_ind)
47{
48 if(beos_block->magic1!=le32(SUPER_BLOCK_MAGIC1) &&
49 beos_block->magic2!=le32(SUPER_BLOCK_MAGIC2) &&
50 beos_block->magic3!=le32(SUPER_BLOCK_MAGIC3))
51 return 1;
52 if(partition==NULL)
53 return 0;
54 if(dump_ind!=0)
55 {
56 log_info("\nBeFS magic value at %u/%u/%u\n", offset2cylinder(disk_car,partition->part_offset),offset2head(disk_car,partition->part_offset),offset2sector(disk_car,partition->part_offset));
57 dump_log(beos_block,DEFAULT_SECTOR_SIZE);
58 }
59 return 0;
60}
61
62
63int check_BeFS(disk_t *disk_car,partition_t *partition)

Callers 2

check_BeFSFunction · 0.85
recover_BeFSFunction · 0.85

Calls 4

offset2cylinderFunction · 0.85
offset2headFunction · 0.85
offset2sectorFunction · 0.85
dump_logFunction · 0.85

Tested by

no test coverage detected