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 <<a href="mailto:vigalchin@gmail.com">vigalchin@gmail.com</a>> 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> fs <- openFd "/dev/cdrom" ReadOnly (Just ???) defaultFileFlags<br>
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 <<a href="mailto:allbery@ece.cmu.edu" target="_blank">allbery@ece.cmu.edu</a>> 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>> Hello,<br>><br>> The signature for openFD is<br>><br>> openFd: FilePath<br>> -> OpenMode<br>
> -> Maybe FileMode<br>> -> OpenFileFlags<br>> -> IO Fd<br>><br>> 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>
> libraries/unix/System-Posix-Files.html and diving down into links<br>> but can't find the definition of data type FileMode. ??? Basically<br>> I want to open in O_RDONLY filemode.<br><br></div></div>That's an OpenMode, not a FileMode. The FileMode values are at the<br>
top of System-Posix-Files.html and correspond to Unix open()'s third<br>argument. (ownerReadMode, etc.) 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 KF8NH<br><br><br></font></blockquote></div><br>
</div></div></blockquote></div><br>