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

Function log_CHS_from_LBA

src/intrf.c:271–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271void log_CHS_from_LBA(const disk_t *disk_car, const unsigned long int pos_LBA)
272{
273 unsigned long int tmp;
274 unsigned long int cylinder, head, sector;
275 tmp=disk_car->geom.sectors_per_head;
276 sector=(pos_LBA%tmp)+1;
277 tmp=pos_LBA/tmp;
278 cylinder=tmp / disk_car->geom.heads_per_cylinder;
279 head=tmp % disk_car->geom.heads_per_cylinder;
280#ifndef DISABLED_FOR_FRAMAC
281 log_info("%lu/%lu/%lu", cylinder, head, sector);
282#endif
283}

Callers 1

test_BSDFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_BSDFunction · 0.68