Name

scsi_partsize — Parse cylinders/heads/sectors from PC partition table

Synopsis

int scsi_partsize (unsigned char * buf,
 unsigned long capacity,
 unsigned int * cyls,
 unsigned int * hds,
 unsigned int * secs);
 

Arguments

unsigned char * buf

partition table, see scsi_bios_ptable

unsigned long capacity

size of the disk in sectors

unsigned int * cyls

put cylinders here

unsigned int * hds

put heads here

unsigned int * secs

put sectors here

Description

determine the BIOS mapping/geometry used to create the partition table, storing the results in *cyls, *hds, and *secs

Return

-1 on failure, 0 on success.