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

Function offset2CHS

src/fnctdsk.c:82–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void offset2CHS(const disk_t *disk_car,const uint64_t offset, CHS_t*CHS)
83{
84 uint64_t pos=offset/disk_car->sector_size;
85 CHS->sector=(pos%disk_car->geom.sectors_per_head)+1;
86 pos/=disk_car->geom.sectors_per_head;
87 CHS->head=pos%disk_car->geom.heads_per_cylinder;
88 CHS->cylinder=pos/disk_car->geom.heads_per_cylinder;
89}
90
91void dup_partition_t(partition_t *dst, const partition_t *src)
92{

Callers 6

write_all_log_i386Function · 0.85
partition2_i386_entryFunction · 0.85
i386_entry2partitionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected