Cygwin: cygtls: rename sig to current_sig
[newlib-cygwin.git] / winsup / cygwin / fhandler / nodevice.cc
blob515b1ae588d0df976505a4f1955d6896faf527bd
1 /* fhandler_nodevice.cc. "No such device" handler.
3 This file is part of Cygwin.
5 This software is a copyrighted work licensed under the terms of the
6 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
7 details. */
9 #include "winsup.h"
10 #include "cygerrno.h"
11 #include "path.h"
12 #include "fhandler.h"
14 int
15 fhandler_nodevice::open (int flags, mode_t)
17 if (!pc.error)
18 set_errno (ENXIO);
19 /* Fixup EROFS error returned from path_conv if /dev is not backed by real
20 directory on disk and the file doesn't exist. */
21 else if (pc.error == EROFS && (flags & O_ACCMODE) == O_RDONLY)
22 set_errno (ENOENT);
23 return 0;
26 fhandler_nodevice::fhandler_nodevice ()