Provides access to the CD-ROM device driver.
The CD-ROM special file provides block and character (raw) access to disks in the CD-ROM drives.
The r prefix on a special file name means the drive is accessed as a raw device rather than a block device. Performing raw I/O with a compact disk requires the performance of all data transfers in multiples of the compact-disk logical block length. Also, all lseek subroutines made to the raw CD-ROM device driver must set the file offset pointer to a value that is a multiple of the specified logical block size.
Compact disks, used in CD-ROM device drivers, are read-only media that provide storage for large amounts of data. The special files /dev/cd0, /dev/cd1,... provide block access to compact disks. The special files /dev/rcd0, /dev/rc1,... provide character access.
When a CD-ROM disc is ejected from the drive for a mounted CD-ROM file system, the files on the compact disc can no longer be accessed. Before these files can be accessed again, the file systems mounted from the CD-ROM must be unmounted. Processes having files open on these file systems should be exited. Processes having current directories on these file systems should be moved. If these actions do not work, perform a forced unmount.
Another problem that results from ejecting the CD-ROM disc for a mounted CD-ROM file system is that InfoExplorer and the man command can become unresponsive. Reinserting the CD-ROM disc will not fix the problem. All InfoExplorer processes (graphical and ASCII) should be exited and the file system should be forced unmounted and mounted again. Afterwards, InfoExplorer and any man commands can be started again.
Most CD-ROM operations are
implemented using the open, read, and close
subroutines. However, for some purposes, use of the openx
(extended) subroutine is required.
openx Subroutine | The openx subroutine is supported to provide additional functions to the open sequence. The openx subroutine requires appropriate authority to start. Attempting to execute this subroutine without the proper authority results in a return value of -1, with the errno global variable set to EPERM. |
ioctl Subroutine | The IOCINFO ioctl operation is defined for all device drivers that use the ioctl subroutine. The remaining ioctl operations are all physical volume device-specific operations. Diagnostic mode is not required for the following operation. The IOCINFO operation returns a devinfo structure, which is defined in the devinfo.h file. |
In addition to the error codes
listed for the ioctl, open, read, and
write subroutines, the following error codes are also
possible:
The cd special file is part of Base Operating System (BOS) Runtime.
The close subroutine, ioctl subroutine, lseek subroutine, open subroutine, read subroutine.
The scdisk SCSI Device Driver in AIX 5L Version 5.1 Technical Reference: Kernel and Subsystems Volume 1.
SCSI Subsystem Overview in AIX 5L Version 5.1 Kernel Extensions and Device Support Programming Concepts.