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

Function get_next_cluster

src/fat.c:414–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412}
413
414unsigned int get_next_cluster(disk_t *disk,const partition_t *partition, const upart_type_t upart_type,const int offset, const unsigned int cluster)
415{
416 /* Offset can be offset to FAT1 or to FAT2 */
417 switch(upart_type)
418 {
419 case UP_FAT12:
420 return get_next_cluster_fat12(disk, partition, offset, cluster);
421 case UP_FAT16:
422 return get_next_cluster_fat16(disk, partition, offset, cluster);
423 case UP_FAT32:
424 return get_next_cluster_fat32(disk, partition, offset, cluster);
425 default:
426#ifndef DISABLED_FOR_FRAMAC
427 log_critical("fat.c get_next_cluster unknown fat type\n");
428#endif
429 return 0;
430 }
431}
432
433int set_next_cluster(disk_t *disk_car,const partition_t *partition, const upart_type_t upart_type,const int offset, const unsigned int cluster, const unsigned int next_cluster)
434{

Callers 3

exfat_remove_used_spaceFunction · 0.85
fat_dirFunction · 0.85
fat_copyFunction · 0.85

Calls 3

get_next_cluster_fat12Function · 0.85
get_next_cluster_fat16Function · 0.85
get_next_cluster_fat32Function · 0.85

Tested by

no test coverage detected