|
Linux Kernel
3.7.1
|
#include <linux/module.h>#include <linux/slab.h>#include <linux/fs.h>#include <linux/genhd.h>#include <linux/kernel.h>#include <linux/blkdev.h>#include <asm/unaligned.h>#include <scsi/scsicam.h>Go to the source code of this file.
Functions | |
| unsigned char * | scsi_bios_ptable (struct block_device *dev) |
| EXPORT_SYMBOL (scsi_bios_ptable) | |
| int | scsicam_bios_param (struct block_device *bdev, sector_t capacity, int *ip) |
| EXPORT_SYMBOL (scsicam_bios_param) | |
| int | scsi_partsize (unsigned char *buf, unsigned long capacity, unsigned int *cyls, unsigned int *hds, unsigned int *secs) |
| EXPORT_SYMBOL (scsi_partsize) | |
| EXPORT_SYMBOL | ( | scsi_bios_ptable | ) |
| EXPORT_SYMBOL | ( | scsicam_bios_param | ) |
| EXPORT_SYMBOL | ( | scsi_partsize | ) |
| 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.
| 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.
| 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.
1.8.2