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

Function check_sysv

src/sysv.c:64–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62static int test_sysv4(const disk_t *disk_car, const struct sysv4_super_block *sbd, const partition_t *partition, const int verbose);
63
64int check_sysv(disk_t *disk_car,partition_t *partition,const int verbose)
65{
66 unsigned char *buffer=(unsigned char*)MALLOC(SYSV4_SECTOR_SIZE);
67 if(disk_car->pread(disk_car, buffer, SYSV4_SECTOR_SIZE, partition->part_offset + 0x200) != SYSV4_SECTOR_SIZE)
68 {
69 free(buffer);
70 return 1;
71 }
72 if(test_sysv4(disk_car, (const struct sysv4_super_block *)buffer, partition, verbose)==0)
73 {
74 set_sysv4_info((const struct sysv4_super_block *)buffer, partition);
75 free(buffer);
76 return 0;
77 }
78 free(buffer);
79 return 1;
80}
81
82static int test_sysv4(const disk_t *disk_car, const struct sysv4_super_block *sbd, const partition_t *partition, const int verbose)
83{

Callers 1

check_part_noneFunction · 0.85

Calls 3

MALLOCFunction · 0.85
test_sysv4Function · 0.85
set_sysv4_infoFunction · 0.85

Tested by

no test coverage detected