* 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.
This commit is contained in:
Christopher Faylor
2012-04-01 07:19:52 +00:00
parent e2e887c5ac
commit 727a81f4d9
6 changed files with 11450 additions and 12259 deletions

View File

@ -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);