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

Function check_xfs

src/xfs.c:107–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105
106
107int check_xfs(disk_t *disk_car,partition_t *partition,const int verbose)
108{
109 unsigned char *buffer=(unsigned char*)MALLOC(XFS_SUPERBLOCK_SIZE);
110 if(disk_car->pread(disk_car, buffer, XFS_SUPERBLOCK_SIZE, partition->part_offset) != XFS_SUPERBLOCK_SIZE)
111 {
112 free(buffer);
113 return 1;
114 }
115 if(test_xfs(disk_car, (struct xfs_sb*)buffer, partition, verbose)!=0)
116 {
117 free(buffer);
118 return 1;
119 }
120 set_xfs_info((struct xfs_sb*)buffer, partition);
121 free(buffer);
122 return 0;
123}
124
125int recover_xfs(const disk_t *disk_car, const struct xfs_sb *sb, partition_t *partition, const int verbose, const int dump_ind)
126{

Callers 2

check_part_noneFunction · 0.85
check_linuxFunction · 0.85

Calls 3

MALLOCFunction · 0.85
test_xfsFunction · 0.85
set_xfs_infoFunction · 0.85

Tested by

no test coverage detected