<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//en">

<!–Converted with LaTeX2HTML 2022 (Released January 1, 2022) –> <HTML lang="en"> <HEAD> <TITLE>Contents of Options</TITLE>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0"> <META NAME="Generator" CONTENT="LaTeX2HTML v2022">

<LINK REL="STYLESHEET" HREF="cdrom-st.css">

<LINK REL="previous" HREF="node18_mn.html"> <LINK REL="up" HREF="node2_mn.html"> <LINK REL="next" HREF="node20_mn.html"> </HEAD>

<BODY bgcolor="#ffffff" text="#000000" link="#9944EE" vlink="#0000ff" alink="#00ff00">

<H2><A ID="SECTION000217000000000000000"> Options</A> </H2> <P> <TT>A final flag register controls the <EM>behavior</EM> of the CD<SMALL>ROM</SMALL> drives, in order to satisfy different users' wishes, hopefully independently of the ideas of the respective author who happened to have made the drive's support available to the L<SMALL>INUX</SMALL> community. The current behavior options are: </TT><P><!– MATH

$\displaystyle \halign$$#$  & $/*$ #$*/$$\displaystyle \cr$CDOAUTOCLOSE & trytoclosetrayupondevice$open()$$\displaystyle \cr$CDOAUTOEJECT & trytoopentrayonlastdevice$close()$$\displaystyle \cr$CDOUSEFFLAGS & use$filepointerfflagstoindicatepurposefor$open()$$\displaystyle \cr$CDOLOCK & trytolockdoorifdeviceisopened$\displaystyle \cr$CDOCHECKTYPE & ensuredisctypeisdataifopenedfordata$\displaystyle \cr$

–> </P> <DIV ALIGN="CENTER"> <IMG STYLE="" SRC="img1.png" ALT=" $\displaystyle \halign$">#&nbsp; &amp; /*#*/<IMG STYLE="" SRC="img2.png" ALT=" $\displaystyle \cr$"><I>CDO</I><SUB>A</SUB><I>UTO</I><SUB>C</SUB><I>LOSE</I> &amp; <I>trytoclosetrayupondevice</I> < I > open < /I > ()<IMG STYLE="" SRC="img2.png" ALT=" $\displaystyle \cr$"><I>CDO</I><SUB>A</SUB><I>UTO</I><SUB>E</SUB><I>JECT</I> &amp; <I>trytoopentrayonlastdevice</I> < I > close < /I > ()<IMG STYLE="" SRC="img2.png" ALT=" $\displaystyle \cr$"><I>CDO</I><SUB>U</SUB><I>SE</I><SUB>F</SUB><I>FLAGS</I> &amp; <I>use</I> < I > file < /I > < SUB > p < /SUB > < I > ointer < /I > & #8594; < I > f < /I > < SUB > f < /SUB > < I > lags < /I ><I>toindicatepurposefor</I> < I > open < /I > ()<IMG STYLE="" SRC="img2.png" ALT=" $\displaystyle \cr$"><I>CDO</I><SUB>L</SUB><I>OCK</I> &amp; <I>trytolockdoorifdeviceisopened</I><IMG STYLE="" SRC="img2.png" ALT=" $\displaystyle \cr$"><I>CDO</I><SUB>C</SUB><I>HECK</I><SUB>T</SUB><I>YPE</I> &amp; <I>ensuredisctypeisdataifopenedfordata</I><IMG STYLE="" SRC="img2.png" ALT=" $\displaystyle \cr$"> </DIV><P></P> <P> <TT>The initial value of this register is <!– MATH CDOAUTOCLOSE | CDOUSEFFLAGS | CDOLOCK –> <I>CDO</I><SUB>A</SUB><I>UTO</I><SUB>C</SUB><I>LOSE</I> | <I>CDO</I><SUB>U</SUB><I>SE</I><SUB>F</SUB><I>FLAGS</I> | <I>CDO</I><SUB>L</SUB><I>OCK</I>, reflecting my own view on user interface and software standards. Before you protest, there are two new <I>ioctl</I>s implemented in <TT>cdrom.c</TT>, that allow you to control the behavior by software. These are: </TT><P><!– MATH

$\displaystyle \halign$$#$  & $/*$ #$*/$$\displaystyle \cr$CDROMSETOPTIONS & setoptionsspecifiedin$(intarg$$\displaystyle \cr$CDROMCLEAROPTIONS & clearoptionsspecifiedin$(intarg$$\displaystyle \cr$

–> </P> <DIV ALIGN="CENTER"> <IMG STYLE="" SRC="img1.png" ALT=" $\displaystyle \halign$">#&nbsp; &amp; /*#*/<IMG STYLE="" SRC="img2.png" ALT=" $\displaystyle \cr$"><I>CDROM</I><SUB>S</SUB><I>ET</I><SUB>O</SUB><I>PTIONS</I> &amp; <I>setoptionsspecifiedin</I> ( < I > int < /I > ) & nbsp; < I > arg < /I ><IMG STYLE="" SRC="img2.png" ALT=" $\displaystyle \cr$"><I>CDROM</I><SUB>C</SUB><I>LEAR</I><SUB>O</SUB><I>PTIONS</I> &amp; <I>clearoptionsspecifiedin</I> ( < I > int < /I > ) & nbsp; < I > arg < /I ><IMG STYLE="" SRC="img2.png" ALT=" $\displaystyle \cr$"> </DIV><P></P><TT> One option needs some more explanation: <!– MATH CDOUSEFFLAGS –> <I>CDO</I><SUB>U</SUB><I>SE</I><SUB>F</SUB><I>FLAGS</I>. In the next section we explain what the need for this option is. </TT> <P> <HR>

</BODY> </HTML>