diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-04-01 00:14:14 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-04-01 00:14:14 +0400 |
commit | e2e887c5aca1e3413b614fb46bb766d6be2283bf (patch) | |
tree | b0437bd1b845d1be79faa398ff98e1c720c624f5 /winsup/cygwin/devices.h | |
parent | 4303e52e4f107d60dbbf2ba94fd84aaa7fbca98a (diff) |
* devices.cc: Regenerate.
* devices.h (device::exists_func): New member function pointer,
replacing noexpose.
(device::expose): Remove.
(device::exists_never): Declare.
(device::exists_ptys): Declare.
(device::exists_cons): Declare.
(device::exists_console): Declare.
(device::exists_nt_dev): Declare.
(device::exists): Declare.
* devices.in (dev_storage): Replace former noexpose values with
pointers to matching exists_XXX method.
(device::exists_never): New method.
(device::exists_ptys): New method.
(device::exists_cons): New method.
(device::exists_console): New method.
(device::exists_nt_dev): New method.
(device::exists): New method.
* fhandler_dev.cc (fhandler_dev::readdir): Replace call to
device::expose with call to device::exists and drop all further
existence filtering since it's done in device::exists now.
* path.cc (path_conv::check): Replace call to device::expose with call
to device::exists.
Diffstat (limited to 'winsup/cygwin/devices.h')
-rw-r--r-- | winsup/cygwin/devices.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/devices.h b/winsup/cygwin/devices.h index 57bf2eb59..d5e20a7e6 100644 --- a/winsup/cygwin/devices.h +++ b/winsup/cygwin/devices.h @@ -275,7 +275,7 @@ struct device }; } d; const char *native; - bool noexpose:1; + bool (device::*exists_func)() const; bool dev_on_fs:1; _mode_t mode; static const device *lookup (const char *, unsigned int = UINT32_MAX); @@ -311,7 +311,6 @@ struct device _minor_t get_minor () const {return d.minor;} _major_t get_major () const {return d.major;} - inline bool expose () const {return !noexpose;} inline operator int& () {return d.devn_int;} inline operator fh_devices () {return d.devn_fh_devices;} inline operator bool () {return !!d.devn_int;} @@ -320,6 +319,13 @@ struct device inline void setfs (bool x) {dev_on_fs = x;} inline bool isfs () const {return dev_on_fs || d.devn == FH_FS;} inline bool is_fs_special () const {return dev_on_fs && d.devn != FH_FS;} + + bool exists_never () const; + bool exists_ptys () const; + bool exists_cons () const; + bool exists_console () const; + bool exists_nt_dev () const; + bool exists () const; }; extern const device dev_storage[]; |