* 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.
This commit is contained in:
Corinna Vinschen
2012-03-31 20:14:14 +00:00
parent 4303e52e4f
commit e2e887c5ac
6 changed files with 2842 additions and 2740 deletions

View File

@@ -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[];