COHERENT manpages

This page displays the COHERENT manpage for hdioctl.h [Control hard-disk I/O].

List of available manpages
Index


hdioctl.h -- Header File

Control hard-disk I/O
#include <sys/hdioctl.h>

Header file <sys/hdioctl.h> declares constants and structures used to
control hard-disk I/O.

Structure ide_info is used by the command ideinfo to hold information about
IDE drives.  It is defined as follows:

typedef struct ide_info {
     unsigned short ii_config;/* Configuration */
     unsigned short ii_cyl;   /* Cylinders (default translation mode) */
     unsigned short ii_reserved;/* reserved */
     unsigned short ii_heads; /* heads (default translation mode */
     unsigned short ii_bpt;   /* bytes per track (unformatted) */
     unsigned short ii_bps;   /* bytes per sector (unformatted) */
     unsigned short ii_spt;   /* sectors per track (default translation mode) */
     unsigned short ii_vendor1[3];/* vendor's unique data */
     unsigned short ii_serialnum[10];/* serial number in ASCII */
     unsigned short ii_buffertype;/* buffer type */
     unsigned short ii_buffersize;/* buffer size in 512-byte sectors */
     unsigned short ii_eccbyteslong;/* ecc bytes for r/w long */
     unsigned short ii_firmrev[4];/* firmware revision in ASCII */
     unsigned short ii_modelnum[20];/* model number in ASCII */
     unsigned short ii_doublewordio;/* double word transfer flag */
     unsigned short ii_capabilities;/* capabilities */
     unsigned short ii_reserved2;/* reserved */
     unsigned short ii_piomode;/* PIO data transfer timing mode */
     unsigned short ii_dmamode;/* DMA data transfer timing mode */
     unsigned short ii_reserved3[75];/* reserved */
     unsigned short ii_vendor2[32];/* vendor unique data */
     unsigned short ii_reserved4[96]; /* reserved */
} ide_info_t;
Field  ii_config  is  a set  of  flags  that  describes  how the  drive  is
configured, as follows:

bit 0
     Not used.
bit 1
     Disk is hard sectored.
bit 2
     Disk is soft sectored.
bit 3
     Disk is not MFM encoded.
bit 4
     Disk's head switch time is less than 15 microseconds.
bit 5
     Spindled motor control option is implemented.
bit 6
     Fixed drive.
bit 7
     Not used.
bit 8
     Disk's transfer rate is less than five megabytes per second.
bit 9
     Disk's transfer  rate exceeds five megabytes per  second but less than
     or equal to 10 megabytes per second.
bit 10
     The disk's transfer rate exceeds ten megabytes per second.
bit 11
     The rotational's speed tolerance is greater than 0.5%.
bit 12
     The data strobe offset option is available.
bit 13
     The track offset option is available.
bit 14
     The format speed-tolerance gap required.
bit 15
     Not used.

Structure  hdparm_s holds  the drive's  attributes.   It is  configured for
binary compatibility with ROM data.

typedef struct hdparm_s {
     unsigned char ncyl[2];   /* number of cylinders */
     unsigned char nhead;     /* number heads */
     unsigned char rwccp[2];  /* reduced write curr cyl */
     unsigned char wpcc[2];   /* write pre-compensation cyl */
     unsigned char eccl;      /* max ecc data length */
     unsigned char ctrl;      /* control byte */
     unsigned char fill2[3];
     unsigned char landc[2];  /* landing zone cylinder */
     unsigned char nspt;      /* number of sectors per track */
     unsigned char hdfill3;
} hdparm_t;

See Also

hard disk,
header files,
ideinfo