i.e. only the Linux CDROM device driver in read-only mode....<br><br>V.<br><br><div class="gmail_quote">On Jan 30, 2008 11:23 PM, Galchin Vasili &lt;<a href="mailto:vigalchin@gmail.com">vigalchin@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I am trying to do the following on RedHat RHEL 5.0:<br><br>main = do <br>&nbsp;&nbsp;&nbsp; fs &lt;- openFd &quot;/dev/cdrom&quot; ReadOnly (Just ???) defaultFileFlags<br>
&nbsp;&nbsp;&nbsp; putStrLn (show fd)<br><br>what should (Just ???) be ???<br><br>
Regards, Vasili<div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Jan 30, 2008 11:10 PM, Brandon S. Allbery KF8NH &lt;<a href="mailto:allbery@ece.cmu.edu" target="_blank">allbery@ece.cmu.edu</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div><br>On Jan 30, 2008, at 23:05 , Galchin Vasili wrote:<br><br>&gt; Hello,<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp;The signature for openFD is<br>&gt;<br>&gt; openFd: FilePath<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; OpenMode<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; Maybe FileMode<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; OpenFileFlags<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; IO Fd<br>&gt;<br>&gt; I am currently reading <a href="http://www.haskell.org/ghc/docs/latest/html/" target="_blank">http://www.haskell.org/ghc/docs/latest/html/</a><br>

&gt; libraries/unix/System-Posix-Files.html &nbsp;and diving down into links<br>&gt; but can&#39;t find the definition of data type FileMode. ??? Basically<br>&gt; I want to open in O_RDONLY filemode.<br><br></div></div>That&#39;s an OpenMode, not a FileMode. &nbsp;The FileMode values are at the<br>

top of System-Posix-Files.html and correspond to Unix open()&#39;s third<br>argument. &nbsp;(ownerReadMode, etc.) &nbsp;OpenMode is documented at the start<br>of <a href="http://www.haskell.org/ghc/docs/latest/html/libraries/unix/System-" target="_blank">http://www.haskell.org/ghc/docs/latest/html/libraries/unix/System-</a><br>

Posix-IO.html .<br><font color="#888888"><br>--<br>brandon s. allbery [solaris,freebsd,perl,pugs,haskell] <a href="mailto:allbery@kf8nh.com" target="_blank">allbery@kf8nh.com</a><br>system administrator [openafs,heimdal,too many hats] <a href="mailto:allbery@ece.cmu.edu" target="_blank">allbery@ece.cmu.edu</a><br>

electrical and computer engineering, carnegie mellon university &nbsp; &nbsp;KF8NH<br><br><br></font></blockquote></div><br>
</div></div></blockquote></div><br>