About Red Hat Partner Programmes Training Support and Docs Products and Services
  downloadstorecart
red hat logo search    
redhat.comredhat network
Red Hat Documentation

Overview | HOWTOs | mini-HOWTOs | FAQs | Linux Man-Pages

sr driver

D.3. sr driver

D.3.2. sr ioctls and user interface

See the following files:
/usr/src/linux/include/linux/cdrom.h
/usr/src/linux/drivers/cdrom/cdrom.c [revision history section]
/usr/src/linux/Documentation/cdrom/cdrom-standard.tex

Some of the following ioctls are described in cdrom-standard.tex :
CDROMCLOSETRAY
CDROM_SET_OPTIONS
CDROM_CLEAR_OPTIONS
CDROM_SELECT_SPEED
CDROM_SELECT_DISC
CDROM_MEDIA_CHANGED
CDROM_DRIVE_STATUS
CDROM_CHANGER_NSLOTS
CDROM_LOCKDOOR
CDROM_DEBUG
CDROM_GET_CAPABILITY
DVD_READ_STRUCT
DVD_WRITE_STRUCT
DVD_AUTH
CDROM_SEND_PACKET
CDROM_NEXT_WRITABLE
CDROM_LAST_WRITTEN

The O_NONBLOCK flag on the open() of scd devices is important. Without it the open() will wait until there is media in the device before returning.

open()          O_NONBLOCK
close()
read()
write()
ioctl()

 

 
 
© 2001 Red Hat, Inc. All rights reserved.       About Red Hat   :   Legal statement   :   Privacy statement   :   Y2K statement   :   Contact Red Hat