/dev patch

Chris January chris@atomice.net
Wed May 22 09:03:00 GMT 2002


I've had this patch kicking about for a while and I was going to merge it
with the next /proc patch but I remembered that separate patches are
generally preferred on this list and the /proc stuff has been delayed
somewhat.
This patch adds support for a virtual /dev which just lists the devices that
cygwin currently supports. The /dev prefix is read from the mount_table, as
is now the /proc prefix. I haven't added a mechanism to read these from the
registry or allow them to be changed using mount since most programs expect
to find these directories at a fixed location.

Regards
Chris

---
2002-05-22  Christopher January <chris@atomice.net>

 * Makefile.in: Add fhandler_dev.o.
 * dtable.cc (dtable::build_fhandler): Add entry for FH_DEV.
 * fhandler.h: Add constant for FH_DEV. Add class declaration for
 fhandler_dev. Update fhandler_union accordingly. Remove global declarations
 for proc and proc_len.
 * fhandler_proc.cc: Remove global definitions for proc and proc_len.
 * fhandler_proc.cc (fhandler_proc::get_proc_fhandler): Use proc prefix from
 mount_table.
 (fhandler_proc::exists): Ditto.
 (fhandler_proc::fstat): Ditto.
 (fhandler_proc::open): Ditto.
 * fhandler_process.cc (fhandler_process::exists): Use proc prefix from
 mount_table.
 (fhandler_proc::fstat): Ditto.
 (fhandler_proc::open): Ditto.
 * fhandler_registry.cc (fhandler_registry::exists): Use proc prefix from
 mount_table.
 (fhandler_registry::readdir): Ditto.
 (fhandler_registry::open): Ditto.
 * fhandler_virtual.cc (fhandler_virtual::close): Remove call to
 delqueue.process_queue().
 * path.cc: Add is_dev macro. Use proc prefix from mount_table in is_proc
 macro. Add FH_DEV to isvirtual_dev macro.
 (path_conv::check): Add FH_DEV support.
 (path_conv::get_device_number): Use dev prefix from mount_table.
 (mount_info::init): Initialise default prefixes for /proc and /dev.
 (mount_info::conv_to_win32_path): Add support for /dev.
 * shared_info.h: Add dev, dev_len, proc and proc_len members to
 mount_table class.
 * fhandler_dev.cc: New file.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dev.patch
Type: application/octet-stream
Size: 17168 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020522/95d36463/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ChangeLog.dev.txt
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020522/95d36463/attachment.txt>


More information about the Cygwin-patches mailing list