r5410: *** empty log message ***
[kmrcl.git] / io-openmcl.lisp
1 (in-package #:kmrcl)
2
3 (defun open-device-stream (path direction)
4   (let* ((mode (ecase direction
5                  (:input #$O_RDONLY)
6                  (:output #$O_WRONLY)
7                  (:io #$O_RDWR)))
8          (fd (ccl::fd-open (ccl::native-translated-namestring path) mode)))
9     (if (< fd 0)
10        (ccl::signal-file-error fd path)
11        (ccl::make-fd-stream fd :direction direction))))
12