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

Function check_JFS

src/jfs.c:77–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77int check_JFS(disk_t *disk_car, partition_t *partition)
78{
79 unsigned char *buffer=(unsigned char*)MALLOC(JFS_SUPERBLOCK_SIZE);
80 if(disk_car->pread(disk_car, buffer, JFS_SUPERBLOCK_SIZE, partition->part_offset + 64 * 512) != JFS_SUPERBLOCK_SIZE)
81 {
82 free(buffer);
83 return 1;
84 }
85 if(test_JFS(disk_car, (struct jfs_superblock*)buffer, partition,0)!=0)
86 {
87 free(buffer);
88 return 1;
89 }
90 set_JFS_info((struct jfs_superblock*)buffer, partition);
91 free(buffer);
92 return 0;
93}
94
95/*
96Primary superblock is at 0x8000

Callers 2

check_part_noneFunction · 0.85
check_linuxFunction · 0.85

Calls 3

MALLOCFunction · 0.85
test_JFSFunction · 0.85
set_JFS_infoFunction · 0.85

Tested by

no test coverage detected