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

Function check_f2fs

src/f2fs.c:52–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52int check_f2fs(disk_t *disk, partition_t *partition)
53{
54 unsigned char *buffer=(unsigned char*)MALLOC(F2FS_BLKSIZE);
55 if(disk->pread(disk, buffer, F2FS_BLKSIZE, partition->part_offset + F2FS_SUPER_OFFSET) != F2FS_BLKSIZE)
56 {
57 free(buffer);
58 return 1;
59 }
60 if(test_f2fs((struct f2fs_super_block*)buffer)!=0)
61 {
62 free(buffer);
63 return 1;
64 }
65 set_f2fs_info(partition, (struct f2fs_super_block*)buffer);
66 free(buffer);
67 return 0;
68}
69
70int test_f2fs(const struct f2fs_super_block *hdr)
71{

Callers 2

check_part_noneFunction · 0.85
check_linuxFunction · 0.85

Calls 3

MALLOCFunction · 0.85
test_f2fsFunction · 0.85
set_f2fs_infoFunction · 0.85

Tested by

no test coverage detected