Technical data
fdio(7I) Ioctl Requests SunOS 5.5
FDEJECT SPARC: This ioctl() requests the floppy drive to eject the diskette.
FDIOCMD The argument is a pointer to an fd_cmd structure (described below).
This ioctl() allows access to the floppy diskette using the floppy device
driver. Only the FDCMD_WRITE, FDCMD_READ, and
FDCMD_FORMAT_TR commands are currently available.
struct fd_cmd {
u_short fdc_cmd; /∗ command to be executed ∗/
int fdc_flags; /∗ execution flags (x86 only) ∗/
daddr_t fdc_blkno; /∗ disk address for command ∗/
int fdc_secnt; /∗ sector count for command ∗/
caddr_t fdc_bufaddr; /∗ user’s buffer address ∗/
u_int fdc_buflen; /∗ size of user’s buffer ∗/
};
/∗
∗ Floppy commands
∗/
#define FDCMD_WRITE 1
#define FDCMD_READ 2
#define FDCMD_SEEK 3
#define FDCMD_REZERO 4
#define FDCMD_FORMAT_UNIT 5
#define FDCMD_FORMAT_TRACK 6
FDRAW The argument is a pointer to an fd_raw structure (described below).
This ioctl() allows direct control of the floppy drive using the floppy
controller. Refer to the appropriate floppy-controller data sheet for full
details on required command bytes and returned result bytes. The fol-
lowing commands are supported.
/∗
∗ Floppy raw commands
∗/
#define FDRAW_SPECIFY 0x03
#define FDRAW_READID 0x0a (x86 only)
#define FDRAW_SENSE_DRV 0x04
#define FDRAW_REZERO 0x07
#define FDRAW_SEEK 0x0f
#define FDRAW_SENSE_INT 0x08 (x86 only)
#define FDRAW_FORMAT 0x0d
#define FDRAW_READTRACK 0x02
#define FDRAW_WRCMD 0x05
#define FDRAW_RDCMD 0x06
#define FDRAW_WRITEDEL 0x09
#define FDRAW_READDEL 0x0c
7I-118 modified 27 Apr 1995










