DKIOCGMEDIAINFO The argument to this ioctl() is a pointer to a dk_minfo structure. The structure indicates the type of media or the com- mand set profile used by the drive to operate on the media. The dk_minfo struc- ture also indicates the logical media blocksize the drive uses as the basic | unit blocksize of operation, the raw | formatted capacity of the media in number | of logical blocks and the physical block | size of the media. /* * Used for media info or profile info */ struct dk_minfo { uint_t dki_media_type; /* Media type or profile info */ uint_t dki_lbsize; /* Logical blocksize of media */ diskaddr_t dki_capacity; /* Capacity as # of dki_lbsize blks */ | uint_t dki_pbsize; /* Physical blocksize of media */ }; /* * Media types or profiles known */ #define DK_UNKNOWN 0x00 /* Media inserted - type unknown */ /* * SFF 8090 Specification Version 3, media types 0x01 - 0xfffe are retained to * maintain compatibility with SFF8090. The following define the * optical media type. */ #define DK_MO_ERASABLE 0x03 /* MO Erasable */ #define DK_MO_WRITEONCE 0x04 /* MO Write once */ #define DK_AS_MO 0x05 /* AS MO */ #define DK_CDROM 0x08 /* CDROM */ #define DK_CDR 0x09 /* CD-R */ #define DK_CDRW 0x0A /* CD-RW */ #define DK_DVDROM 0x10 /* DVD-ROM */ #define DK_DVDR 0x11 /* DVD-R */ #define DK_DVDRAM 0x12 /* DVD_RAM or DVD-RW */ /* * Media types for other rewritable magnetic media */ #define DK_FIXED_DISK 0x10001 /* Fixed disk SCSI or otherwise */ #define DK_FLOPPY 0x10002 /* Floppy media */ #define DK_ZIP 0x10003 /* IOMEGA ZIP media */ #define DK_JAZ 0x10004 /* IOMEGA JAZ media */ If the media exists and the host can obtain a current pro- file list, the command succeeds and returns the dk_minfo structure with data representing that media. If there is no media in the drive, the command fails and the host returns an ENXIO error, indicating that it cannot gather the information requested. If the profile list is not available, the host attempts to identify the media-type based on the available information. If identification is not possible, the host returns media type DK_UNKNOWN. See NOTES for blocksize usage and capacity information.