sd - driver for SCSI disk drives
#include <linux/hdreg.h> /* for HDIO_GETGEO */
#include <linux/fs.h> /* for BLKGETSIZE and BLKRRPART */
The following ioctl
s are provided:
Returns the BIOS disk parameters in the following structure:
struct hd_geometry {
unsigned char heads;
unsigned char sectors;
unsigned short cylinders;
unsigned long start;
};
A pointer to this structure is passed as the ioctl(2) parameter.
The information returned in the parameter is the disk geometry of the drive
as understood by DOS!
This geometry isnot
the physical geometry of the drive. It is used when constructing the drive's partition table, however, and is needed for convenient operation of fdisk(1), efdisk(1), and lilo(1). If the geometry information is not available, zero will be returned for all of the parameters.
Returns the device size in sectors. The ioctl(2)
parameter should be a pointer to a long
.
Forces a reread of the SCSI disk partition tables. No parameter is needed.
The SCSI ioctl(2) operations are also supported. If the ioctl(2) parameter is required, and it is NULL, then ioctl(2) fails with the error EINVAL.