diff options
author | Christopher Faylor <me@cgf.cx> | 2012-04-01 11:19:52 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-04-01 11:19:52 +0400 |
commit | 727a81f4d93f3715d3692685915f99fca5106a8a (patch) | |
tree | afe283f0a204fab15bf8a3caf96b107f0f177fa4 /winsup/cygwin/fhandler_dev.cc | |
parent | e2e887c5aca1e3413b614fb46bb766d6be2283bf (diff) |
* devices.h (device::exists_func): Redefine field.
(device::dev_on_fs): Remove unneeded bit field. Just make a normal boolean.
(device::exists): Redefine function.
* devices.in: Move previous functions earlier since they are now only defined
static. Rename some functions due to an as-yet unresolved bug in gendevices.
Rename posix part of internal-only devices with a double-slash. gendevices
will eventuall translate that to a ":".
(device::parse): Rework to use dev pointer and dev_storage_end.
* devices.cc: Regenerate.
* gendevices: Translate "// to ": after shilka processing.
Diffstat (limited to 'winsup/cygwin/fhandler_dev.cc')
-rw-r--r-- | winsup/cygwin/fhandler_dev.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_dev.cc b/winsup/cygwin/fhandler_dev.cc index 82bd2fa82..d4a3e0c86 100644 --- a/winsup/cygwin/fhandler_dev.cc +++ b/winsup/cygwin/fhandler_dev.cc @@ -119,7 +119,10 @@ fhandler_dev::readdir (DIR *dir, dirent *de) while (devidx < dev_storage_end) { const device& thisdev = *devidx++; - if (!thisdev.exists ()) + /* If exists returns < 0 it means that the device can be used by a + program but its use is deprecated and, so, it is not returned + by readdir((). */ + if (thisdev.exists () <= 0) continue; ++dir->__d_position; strcpy (de->d_name, thisdev.name + dev_prefix_len); |