patch-2.2.0-pre8 linux/Documentation/cdrom/cdrom-standard.tex

Next file: linux/Documentation/cdrom/ide-cd
Previous file: linux/Documentation/Configure.help
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre7/linux/Documentation/cdrom/cdrom-standard.tex linux/Documentation/cdrom/cdrom-standard.tex
@@ -23,8 +23,9 @@
 \begin{document}
 \title{A \linux\ \cdrom\ standard}
 \author{David van Leeuwen\\{\normalsize\tt david@ElseWare.cistron.nl}
-\\{\footnotesize updated by Erik Andersen {\tt(andersee@debian.org)}}}
-\date{19 November 1997}
+\\{\footnotesize updated by Erik Andersen {\tt(andersee@debian.org)}}
+\\{\footnotesize updated by Jens Axboe {\tt(axboe@image.dk)}}}
+\date{11 January 1999}
 
 \maketitle
 
@@ -145,7 +146,7 @@
 low-level \cdrom\ device drivers. The \UCD\ now provides another
 software-level, that separates the $ioctl()$ and $open()$ implementation
 from the actual hardware implementation. Note that this effort has
-made few changes which will effect a user's application programs. The
+made few changes which will affect a user's application programs. The
 greatest change involved moving the contents of the various low-level
 \cdrom\ drivers' header files to the kernel's cdrom directory. This was
 done to help ensure that the user is only presented with only one cdrom
@@ -232,7 +233,7 @@
 struct& cdrom_device_ops\ \{ \hidewidth\cr
   &int& (* open)(struct\ cdrom_device_info *, int)\cr
   &void& (* release)(struct\ cdrom_device_info *);\cr 
-  &int& (* drive_status)(struct\ cdrom_device_info *);\cr     
+  &int& (* drive_status)(struct\ cdrom_device_info *, int);\cr     
   &int& (* media_changed)(struct\ cdrom_device_info *, int);\cr 
   &int& (* tray_move)(struct\ cdrom_device_info *, int);\cr
   &int& (* lock_door)(struct\ cdrom_device_info *, int);\cr
@@ -286,12 +287,13 @@
 \noalign{\medskip}
   & kdev_t&  dev;& device number (incorporates minor)\cr
   & int& mask;& mask of capability: disables them \cr
-  &const\ int& speed;& maximum speed for reading data \cr
-  &const\ int& capacity;& number of discs in a jukebox \cr
+  & int& speed;& maximum speed for reading data \cr
+  & int& capacity;& number of discs in a jukebox \cr
 \noalign{\medskip}
   &int& options : 30;& options flags \cr
-  &long& mc_flags : 2;& media-change buffer flags \cr
+  &unsigned& mc_flags : 2;& media-change buffer flags \cr
   & int& use_count;& number of times device is opened\cr
+  & char& name[20];& name of the device type\cr
 \}\cr
 }$$
 Using this $struct$, a linked list of the registered minor devices is
@@ -371,13 +373,13 @@
 allocated buffers in the VFS is taken care of by the routine in
 \cdromc.  This is the only function returning type $void$. 
 
-\subsection{$Int\ drive_status(struct\ cdrom_device_info * cdi)$}
+\subsection{$Int\ drive_status(struct\ cdrom_device_info * cdi, int\ slot_nr)$}
 \label{drive status}
 
 The function $drive_status$, if implemented, should provide
 information on the status of the drive (not the status of the disc,
-which may or may not be in the drive). In \cdromh\ the possibilities
-are listed: 
+which may or may not be in the drive). If the drive is not a changer,
+$slot_nr$ should be ignored. In \cdromh\ the possibilities are listed: 
 $$
 \halign{$#$\ \hfil&$/*$ \rm# $*/$\hfil\cr
 CDS_NO_INFO& no information available\cr
@@ -810,7 +812,7 @@
 
 
 \subsection{$Int\ cdrom_ioctl(struct\ inode *ip, struct\ file *fp,
-                       unsigned\ int\ cmd, unsigned\ long\ arg)$}
+unsigned\ int\ cmd, unsigned\ long\ arg)$}
 \label{cdrom-ioctl}
 
 This function handles all the standard $ioctl$ requests for \cdrom\
@@ -833,7 +835,7 @@
 \item[CDROMEJECT_SW] If $arg\not=0$, set behavior to auto-close (close
 tray on first open) and auto-eject (eject on last release), otherwise
 set behavior to non-moving on $open()$ and $release()$ calls.
-\item[CDROM_GET_MCN or CDROM_GET_UPC] Get the Media Catalog Number from a CD.
+\item[CDROM_GET_MCN] Get the Media Catalog Number from a CD.
 \end{description}
 
 \subsubsection{$Ioctl$s routed through $audio_ioctl()$}
@@ -931,7 +933,6 @@
     CDS_NO_DISC& no disc is inserted, or tray is opened\cr
     CDS_AUDIO& Audio disc (2352 audio bytes/frame)\cr
     CDS_DATA_1& data disc, mode 1 (2048 user bytes/frame)\cr
-    CDS_DATA_2& data disc, mode 2 (2336 user bytes/frame)\cr
     CDS_XA_2_1& mixed data (XA), mode 2, form 1 (2048 user bytes)\cr
     CDS_XA_2_2& mixed data (XA), mode 2, form 1 (2324  user bytes)\cr
     CDS_MIXED& mixed audio/data disc\cr
@@ -942,6 +943,7 @@
 
 \item[CDROM_CHANGER_NSLOTS] Returns the number of slots in a
   juke-box. 
+\item[CDROMRESET] Reset the drive. 
 \end{description}
 
 \subsubsection{Device dependent $ioctl$s}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov