Writing Device Drivers

Disk ioctls

Solaris disk drivers need to support a minimum set of ioctl commands specific to Solaris disk drivers. These I/O controls are specified in the dkio(7I) manual page. Disk I/O controls transfer disk information to or from the device driver. A Solaris disk device is supported by disk utility commands such as format(1M) and newfs(1M). The mandatory Sun disk I/O controls are as follows:

DKIOCINFO

Returns information that describes the disk controller

DKIOCGAPART

Returns a disk's partition map

DKIOCSAPART

Sets a disk's partition map

DKIOCGGEOM

Returns a disk's geometry

DKIOCSGEOM

Sets a disk's geometry

DKIOCGVTOC

Returns a disk's Volume Table of Contents

DKIOCSVTOC

Sets a disk's Volume Table of Contents