Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
scsicam.h File Reference

Go to the source code of this file.

Functions

int scsicam_bios_param (struct block_device *bdev, sector_t capacity, int *ip)
 
int scsi_partsize (unsigned char *buf, unsigned long capacity, unsigned int *cyls, unsigned int *hds, unsigned int *secs)
 
unsigned char * scsi_bios_ptable (struct block_device *bdev)
 

Function Documentation

unsigned char* scsi_bios_ptable ( struct block_device *  dev)

scsi_bios_ptable - Read PC partition table out of first sector of device. : from this device

Description: Reads the first sector from the device and returns %0x42 bytes starting at offset %0x1be. Returns: partition table in kmalloc(GFP_KERNEL) memory, or NULL on error.

Definition at line 35 of file scsicam.c.

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

scsi_partsize - Parse cylinders/heads/sectors from PC partition table : partition table, see scsi_bios_ptable() : size of the disk in sectors : put cylinders here : put heads here : put sectors here

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

Returns: -1 on failure, 0 on success.

Definition at line 125 of file scsicam.c.

int scsicam_bios_param ( struct block_device *  bdev,
sector_t  capacity,
int *  ip 
)

scsicam_bios_param - Determine geometry of a disk in cylinders/heads/sectors. : which device : size of the disk in sectors : return value: ip[0]=heads, ip[1]=sectors, ip[2]=cylinders

Description : determine the BIOS mapping/geometry used for a drive in a SCSI-CAM system, storing the results in ip as required by the HDIO_GETGEO ioctl().

Returns : -1 on failure, 0 on success.

Definition at line 67 of file scsicam.c.