diff options
author | Christopher Faylor <me@cgf.cx> | 2003-09-25 00:37:18 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-09-25 00:37:18 +0000 |
commit | 7ac6173643b13a5a3bc7daf3649eb20c48c9c908 (patch) | |
tree | b6acd69d1804e5e8b7482e7b943e74aca80b5787 /winsup/cygwin/devices.cc | |
parent | 2d9af27bf33f28984cf7b0e121bb56d1cb21897c (diff) | |
download | newlib-7ac6173643b13a5a3bc7daf3649eb20c48c9c908.zip newlib-7ac6173643b13a5a3bc7daf3649eb20c48c9c908.tar.gz newlib-7ac6173643b13a5a3bc7daf3649eb20c48c9c908.tar.bz2 |
* devices.cc: New file.
* devices.gperf: New file.
* devices.shilka: New file.
* cygwin-gperf: New file.
* cygwin-shilka: New file.
* fhandler_fifo.cc: New file.
* fhandler_nodevice.cc : New file. Reorganize headers so that path.h precedes
fhandler.h throughout. Remove device argument and unit arguments from fhandler
constructors throughout. Remove pc arguments to fhandler functions and use
internal pc element instead, throughout. Use dev element in pc throughout.
Use major/minor elements rather than units and device numbers previously in
fhandler class. Use correct methods for fhandler file names rather than
directly accessing file name variables, throughout.
* Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
* dcrt0.cc (dll_crt0_1): Call device::init.
* devices.h: Renumber devices based on more Linux-like major/minor numbers.
Add more devices. Declare standard device storage.
(device): Declare struct.
* dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_* type.
* dtable.cc (dtable::get_debugger_info): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::release): Remove special FH_SOCKET case in favor of generic
"need_fixup_before" test.
(dtable::init_std_file_from_handle): Use either build_fh_dev or build_fh_name
to build standard fhandler.
(dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name. Move
out of dtable class. Don't accept a path_conv argument. Just build it here
and pass it to:
(build_fh_pc): Renamed from dtable::build_fhandler. Move out of dtable class.
Use intrinsic device type in path_conv to create new fhandler.
(build_fh_dev): Renamed from dtable::build_fhandler. Move out of dtable class.
Simplify arguments to just take new 'device' type and a name. Just return
pointer to fhandler rather than trying to insert into dtable.
(dtable::dup_worker): Accommodate above build_fh name changes.
(dtable::find_fifo): New (currently broken) function.
(handle_to_fn): Use strechr for efficiency.
* dtable.h: Reflect above build_fh name changes and argument differences.
(fhandler_base *&operator []): Return self rather than copy of self.
* fhandler.cc (fhandler_base::operator =): Use pc element to set normalized
path.
(fhandler_base::set_name): Ditto.
(fhandler_base::raw_read): Use method to access name.
(fhandler_base::write): Correctly use get_output_handle rather than get_handle.
(handler_base::device_access_denied): New function.
(fhandler_base::open): Eliminate pc argument and use pc element of
fhandler_base throughout.
(fhandler_base::fstat): Detect if device is based in filesystem and use
fstat_fs to calculate stat, if so.
(fhandler_base::fhandler_base): Eliminate handling of file names and, instead,
just free appropriate component from pc.
(fhandler_base::opendir): Remove path_conv parameter.
* fhandler.h: Remove all device flags.
(fhandler_base::pc): New element.
(fhandler_base::set_name): Change argument to path_conv.
(fhandler_base::error): New function.
(fhandler_base::exists): New function.
(fhandler_base::pc_binmode): New function.
(fhandler_base::dev): New function.
(fhandler_base::open_fs): New function.
(fhandler_base::fstat_fs): New function.
(fhandler_base::fstat_by_name): New function.
(fhandler_base::fstat_by_handle): New function.
(fhandler_base::isfifo): New function.
(fhandler_base::is_slow): New function.
(fhandler_base::is_auto_device): New function.
(fhandler_base::is_fs_special): New function.
(fhandler_base::device_access_denied): New function.
(fhandler_base::operator DWORD&): New operator.
(fhandler_base::get_name): Return normalized path from pc.
(fhandler_base::get_win32_name): Return windows path from pc.
(fhandler_base::isdevice): Renamed from is_device.
(fhandler_base::get_native_name): Return device format.
(fhandler_fifo): New class.
(fhandler_nodevice): New class.
(select_stuff::device_specific): Remove array.
(select_stuff::device_specific_pipe): New class element.
(select_stuff::device_specific_socket): New class element.
(select_stuff::device_specific_serial): New class element.
(select_stuff::select_stuff): Initialize new elements.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base class
from fhandler_disk_file.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_disk_file::open): Move most functionality into
fhandler_base::open_fs.
(fhandler_base::open_fs): New function.
(fhandler_disk_file::close): Move most functionality into
fhandler_base::close_fs.
(fhandler_base::close_fs): New function.
* fhandler_mem.cc (fhandler_dev_mem::open): Use device name in debugging
output.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy standard
urandom device into appropriate place.
(fhandler_socket::accept): Reflect change in fdsock return value.
* fhandler_tty.cc: See "throughouts" above.
* net.cc: Accommodate fdsock change throughout.
(fdsock): Return success or failure, accept fd argument and device argument.
* path.cc (symlink_info::major): New element.
(symlink_info::minor): New element.
(symlink_info::parse_device): Declare new function.
(fs_info::update): Accommodate changes in path_conv class.
(path_conv::fillin): Ditto.
(path_conv::return_and_clear_normalized_path): Eliminate.
(path_conv::set_normalized_path): New function.
(path_conv::path_conv): Set info in dev element. Use path_conv methods Check
for FH_FS rather than FH_BAD to indicate when to fill in filesystem stuff.
where appropriate rather than direct access. Use set_normalized_path to set
normalized path.
(windows_device_names): Eliminate.
(get_dev): Ditto.
(get_raw_device_number): Ditto.
(get_device_number): Ditto.
(win32_device_name): Call new device name parser to do most of the heavy
lifting.
(mount_info::conv_to_win32_path): Fill in dev field as appropriate.
(symlink_worker): Handle new device files.
(symlink_info::check): Ditto.
(symlink_info::parse_device): Define new function.
* path.h (executable_states): Move here from fhandler.h.
(fs_info): Rename variables to *_storage and create methods for accessing same.
(path_conv): Add dev element, remove devn and unit and adjust inline methods to
accommodate.
(set_normalized_path): Declare new function.
* pinfo.cc (_pinfo::commune_recv): Add broken support for handling fifos.
(_pinfo::commune_send): Ditto.
* pipe.cc (fhandler_pipe::close): check for existence of handle before closing
it.
(handler_pipe::create): Rename from make_pipe. Change arguments to accept
fhandler_pipe array. Accommodate fifos.
(pipe): Rework to deal with fhandler_pipe::create changes.
(_pipe): Ditto.
* select.cc: Use individual device_specific types throughout rather than
indexing with obsolete device number.
(set_bits): Use is_socket call rather than checking device number.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(conv_to_win32_path): Reflect addition of device argument.
* syscalls.cc (mknod_worker): New function.
(open): Use build_fh_name to build fhandler.
(chown_worker): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(chmod_device): New function.
(chmod): Detect if this is an 'auto' device rather than an on-filesystem device
and handle appropriately. Use chmod_device to set mode of in-filesystem
devices.
(stat_worker): Eliminate path_conv argument. Call build_fh_name to construct
fhandler. Use fh->error() rather than pc->error to detect errors in fhandler
construction.
(access_worker): New function pulled from access. Accommodate in-filesystem
devices.
(access): Use access_worker.
(fpathconf): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(mknod_worker): New function.
(mknod32): New function.
(chroot): Free normalized path -- assuming it was actually cmalloced.
* tty.cc (create_tty_master): Tweak for new device class.
(tty::common_init): Ditto.
* winsup.h (stat_worker): Remove.
(symlink_worker): Declare.
* exceptions.cc (set_process_mask): Just call sig_dispatch_pending and don't
worry about pending_signals since sig_dispatch_pending should always do the
right thing now.
(sig_handle): Reorganize SIGCONT handling to more closely conform to SUSv3.
* pinfo.h: Move __SIG enum to sigproc.h.
(PICOM_FIFO): New enum element.
(_pinfo): Remove 'thread2signal' stuff throughout class.
(_pinfo::commune_send): Make varargs.
(_pinfo::sigtodo): Eliminate.
(_pinfo::thread2signal): Ditto.
* signal.cc (kill_worker): Eliminate call to setthread2signal.
* sigproc.cc (local_sigtodo): Eliminate.
(getlocal_sigtodo): Ditto.
(sigelem): New class.
(pending_signals): New class.
(sigqueue): New variable, start of sigqueue linked list.
(sigcatch_nonmain): Eliminate.
(sigcatch_main): Eliminate.
(sigcatch_nosync): Eliminate.
(sigcomplete_nonmain): Eliminate.
(pending_signals): Eliminate.
(sig_clear): Call signal thread to clear pending signals, unless already in
signal thread.
(sigpending): Call signal thread to get pending signals.
(sig_dispatch_pending): Eliminate use of pending_signals and just check
sigqueue.
(sigproc_terminate): Eliminate all of the obsolete semaphore stuff. Close
signal pipe handle.
(sig_send): Eliminate all of the obsolete semaphore stuff and use pipe to send
signals.
(getevent): Eliminate.
(pending_signals::add): New function.
(pending_signals::del): New function.
(pending_signals::next): New function.
(wait_sig): Eliminate all of the obsolete semaphore stuff. Use pipe to
communicate and maintain a linked list of signals.
* sigproc.h: Move __SIG defines here. Add __SIGPENDING.
(sig_dispatch_pending): Remove "C" specifier.
(sig_handle): Accept a mask argument.
* thread.cc: Remove signal handling considerations throughout.
Diffstat (limited to 'winsup/cygwin/devices.cc')
-rw-r--r-- | winsup/cygwin/devices.cc | 391 |
1 files changed, 189 insertions, 202 deletions
diff --git a/winsup/cygwin/devices.cc b/winsup/cygwin/devices.cc index 9972c64..ffa891c 100644 --- a/winsup/cygwin/devices.cc +++ b/winsup/cygwin/devices.cc @@ -12,16 +12,18 @@ #undef __GNUC__ static unsigned int devhash (const char *, unsigned) __attribute__ ((regparm (2))); +#define bad_dev (&dev_bad_storage) + enum { TOTAL_KEYWORDS = 54, MIN_WORD_LENGTH = 5, MAX_WORD_LENGTH = 14, - MIN_HASH_VALUE = 131, - MAX_HASH_VALUE = 358 + MIN_HASH_VALUE = 106, + MAX_HASH_VALUE = 288 }; -/* maximum key range = 228, duplicates = 0 */ +/* maximum key range = 183, duplicates = 0 */ #ifdef __GNUC__ __inline @@ -35,19 +37,19 @@ devhash (register const char *str, register unsigned int len) { static const unsigned short asso_values[] = { - 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 60, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, 62, 359, - 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 15, 359, 359, 359, 359, 359, 359, - 359, 359, 359, 359, 359, 359, 359, 0, 2, 46, - 42, 50, 3, 4, 36, 15, 10, 41, 61, 13, - 26, 30, 52, 57, 45, 27, 59, 39, 51, 38, - 32, 18, 14, 359, 359, 359, 359, 359 + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 2, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 62, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 27, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 29, 28, 12, + 45, 59, 32, 39, 24, 11, 19, 53, 55, 2, + 57, 35, 21, 54, 62, 9, 52, 8, 37, 10, + 16, 33, 43, 289, 289, 289, 289, 289 }; register int hval = len; @@ -90,252 +92,237 @@ static NO_COPY const struct device wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {":bad:", FH_BAD, ":bad:", 0, 0, 0, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"/dev/fd", FH_FLOPPY, "\\Device\\Floppy%d", 0, 15}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"/dev/fifo", FH_FIFO, "\\dev\\fifo", 0, 0, 0, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"/dev/com", FH_SERIAL, "\\.\\com%d", 1, 99}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"/dev/sr", FH_CDROM, "\\Device\\CdRom%d", 0, 15}, - {""}, {""}, {""}, {""}, - {"/dev/mem", FH_MEM, "\\dev\\mem", 0, 0, 0, 0}, {""}, - {"/dev/hda", FH_SDA, "\\Device\\Harddisk%d\\Partition%d", 1, 16, -1}, - {""}, - {"/dev/hdb", FH_SDB, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 15}, - {"/dev/hdf", FH_SDF, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 79}, - {"/dev/hdg", FH_SDG, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 95}, - {""}, {""}, {"/dev/st", FH_TAPE, "\\Device\\Tape%d", 0, 127}, {""}, {""}, - {"/dev/hdj", FH_SDJ, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 143}, - {"/dev/com", FH_SERIAL, "\\.\\com%d", 1, 99}, - {""}, + {"/dev/mem", FH_MEM, "\\dev\\mem", 0, 0, 0, 0}, + {""}, {""}, + {"/dev/scd", FH_CDROM, "\\Device\\CdRom%d", 0, 15}, + {""}, {""}, {""}, + {"/dev/sr", FH_CDROM, "\\Device\\CdRom%d", 0, 15}, {"/dev/hdm", FH_SDM, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 191}, - {"/dev/hdz", FH_SDZ, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 399}, + {""}, {""}, {""}, + {"/dev/dsp", FH_OSS_DSP, "\\dev\\dsp", 0, 0, 0, 0}, + {"/dev/fd", FH_FLOPPY, "\\Device\\Floppy%d", 0, 15}, + {"/dev/hdu", FH_SDU, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 319}, + {"/dev/hds", FH_SDS, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 287}, + {"/dev/hdw", FH_SDW, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 351}, {"/dev/hdi", FH_SDI, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 127}, + {"/dev/hdc", FH_SDC, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 31}, + {""}, {""}, {""}, + {"/dev/hdx", FH_SDX, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 367}, {""}, {""}, + {"/dev/hdj", FH_SDJ, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 143}, + {""}, + {"/dev/hdp", FH_SDP, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 239}, + {""}, + {"/dev/ptmx", FH_PTYM, "\\dev\\ptmx", 0, 0, 0, 0}, + {"/dev/hdh", FH_SDH, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 111}, + {""}, {""}, {""}, + {"/dev/hdb", FH_SDB, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 15}, + {"/dev/hda", FH_SDA, "\\Device\\Harddisk%d\\Partition%d", 1, 16, -1}, + {""}, + {":bad:", FH_BAD, ":bad:", 0, 0, 0, 0}, + {"/dev/hdf", FH_SDF, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 79}, {"/dev/hdy", FH_SDY, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 383}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"/dev/hdn", FH_SDN, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 207}, - {"/dev/hds", FH_SDS, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 287}, - {""}, {""}, - {"/dev/hdo", FH_SDO, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 223}, {""}, - {"/dev/hdx", FH_SDX, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 367}, + {"/dev/hdo", FH_SDO, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 223}, {""}, - {"/dev/nst", FH_NTAPE, "\\Device\\Tape%d", 0, 127}, + {"/dev/hdv", FH_SDV, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 335}, {""}, - {"/dev/hdh", FH_SDH, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 111}, - {"/dev/scd", FH_CDROM, "\\Device\\CdRom%d", 0, 15}, - {"/dev/hdw", FH_SDW, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 351}, - {"/dev/hdu", FH_SDU, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 319}, + {"/dev/hdg", FH_SDG, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 95}, + {""}, {""}, + {"/dev/fifo", FH_FIFO, "\\dev\\fifo", 0, 0, 0, 0}, + {"/dev/hdz", FH_SDZ, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 399}, + {"/dev/pipe", FH_PIPE, "\\dev\\pipe", 0, 0, 0, 0}, + {"/dev/hdd", FH_SDD, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 47}, + {""}, {""}, {"/dev/kmem", FH_KMEM, "\\dev\\mem", 0, 0, 0, 0}, + {"/dev/nst", FH_NTAPE, "\\Device\\Tape%d", 0, 127}, + {""}, {""}, + {"/dev/hdt", FH_SDT, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 303}, {"/dev/hdk", FH_SDK, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 159}, - {"/dev/hdd", FH_SDD, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 47}, - {"/dev/dsp", FH_OSS_DSP, "\\dev\\dsp", 0, 0, 0, 0}, + {"/dev/hdq", FH_SDQ, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 255 /* FIXME 8 bit lunacy */}, + {"/dev/hdl", FH_SDL, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 175}, + {""}, + {"/dev/hdn", FH_SDN, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 207}, {""}, - {"/dev/hdr", FH_SDR, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 271}, - {"/dev/hdc", FH_SDC, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 31}, - {""}, {""}, {""}, {"/dev/hde", FH_SDE, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 63}, - {"/dev/hdv", FH_SDV, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 335}, - {"/dev/hdp", FH_SDP, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 239}, - {""}, {""}, {""}, {""}, - {"/dev/hdq", FH_SDQ, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 255 /* FIXME 8 bit lunacy */}, - {"/dev/tty", FH_TTY, "\\dev\\tty", 0, 0, 0, 0}, - {"/dev/hdt", FH_SDT, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 303}, + {""}, {""}, + {"/dev/hdr", FH_SDR, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 271}, {""}, - {"/dev/hdl", FH_SDL, "\\Device\\Harddisk%d\\Partition%d", 1, 16, 175}, - {"/dev/zero", FH_ZERO, "\\dev\\zero", 0, 0, 0, 0}, - {""}, {""}, {""}, {""}, - {"/dev/conin", FH_CONIN, "conin", 0, 0, 0, 0}, - {"/dev/random", FH_RANDOM, "\\dev\\random", 0, 0, 0, 0}, + {"/dev/clipboard", FH_CLIPBOARD, "\\dev\\clipboard", 0, 0, 0, 0}, {""}, {""}, {""}, + {"/dev/tty", FH_TTY, "\\dev\\tty", 0, 0, 0, 0}, + {""}, {""}, {"/dev/ttym", FH_TTYM, "\\dev\\ttym", 0, 255, 0, 0}, - {""}, - {"/dev/ttyS", FH_SERIAL, "\\.\\com%d", 0, 99, -1}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"/dev/ttys", FH_TTYS, "\\dev\\tty%d", 0, 255, 0, 0}, {""}, {""}, + {"/dev/conout", FH_CONOUT, "conout", 0, 0, 0, 0}, + {""}, + {"/dev/console", FH_CONSOLE, "\\dev\\console", 0, 0, 0, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {"/dev/windows", FH_WINDOWS, "\\dev\\windows", 0, 0, 0, 0}, - {"/dev/urandom", FH_URANDOM, "\\dev\\urandom", 0, 0, 0, 0}, - {"/dev/ptmx", FH_PTYM, "\\dev\\ptmx", 0, 0, 0, 0}, + {""}, {""}, + {"/dev/ttyS", FH_SERIAL, "\\.\\com%d", 0, 99, -1}, {""}, {""}, {""}, {""}, {""}, - {"/dev/console", FH_CONSOLE, "\\dev\\console", 0, 0, 0, 0}, - {"/dev/ttys", FH_TTYS, "\\dev\\tty%d", 0, 255, 0, 0}, + {"/dev/port", FH_PORT, "\\dev\\port", 0, 0, 0, 0}, + {""}, {""}, + {"/dev/conin", FH_CONIN, "conin", 0, 0, 0, 0}, + {""}, + {"/dev/null", FH_NULL, "nul", 0, 0, 0, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"/dev/pipe", FH_PIPE, "\\dev\\pipe", 0, 0, 0, 0}, - {""}, {""}, {""}, - {"/dev/conout", FH_CONOUT, "conout", 0, 0, 0, 0}, - {"/dev/rawdrive", FH_RAWDRIVE, "\\DosDevices\\%c:", 0, 0, 0, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"/dev/clipboard", FH_CLIPBOARD, "\\dev\\clipboard", 0, 0, 0, 0}, + {"/dev/zero", FH_ZERO, "\\dev\\zero", 0, 0, 0, 0}, {""}, {""}, {""}, {""}, - {"/dev/port", FH_PORT, "\\dev\\port", 0, 0, 0, 0}, - {"/dev/null", FH_NULL, "nul", 0, 0, 0, 0} + {"/dev/urandom", FH_URANDOM, "\\dev\\urandom", 0, 0, 0, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"/dev/rawdrive", FH_RAWDRIVE, "\\DosDevices\\%c:", 0, 0, 0, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"/dev/random", FH_RANDOM, "\\dev\\random", 0, 0, 0, 0} }; -static const device cygdrive_dev_storage = +const device dev_cygdrive_storage = {"/cygdrive", FH_CYGDRIVE, "/cygdrive", 0, 0, 0, 0}; -static const device fs_dev_storage = +const device dev_fs_storage = {"", FH_FS, "", 0, 0, 0, 0}; -static const device proc_dev_storage = +const device dev_proc_storage = {"", FH_PROC, "", 0, 0, 0, 0}; -static const device registry_dev_storage = +const device dev_registry_storage = {"", FH_REGISTRY, "", 0, 0, 0, 0}; -static const device process_dev_storage = +const device dev_process_storage = {"", FH_PROCESS, "", 0, 0, 0, 0}; -static const device tcp_dev_storage = +const device dev_tcp_storage = {"/dev/inet/tcp", FH_TCP, "", 0, 0, 0, 0}; -static const device udp_dev_storage = +const device dev_udp_storage = {"/dev/inet/udp", FH_UCP, "", 0, 0, 0, 0}; -static const device icmp_dev_storage = +const device dev_icmp_storage = {"/dev/inet/icmp", FH_ICMP, "", 0, 0, 0, 0}; -static const device unix_dev_storage = +const device dev_unix_storage = {"/dev/inet/unix", FH_UNIX, "", 0, 0, 0, 0}; -static const device stream_dev_storage = +const device dev_stream_storage = {"/dev/inet/stream", FH_STREAM, "", 0, 0, 0, 0}; -static const device dgram_dev_storage = +const device dev_dgram_storage = {"/dev/inet/dgram", FH_DGRAM, "", 0, 0, 0, 0}; -static const device piper_dev_storage = +const device dev_piper_storage = {"", FH_PIPER, "", 0, 0, 0, 0}; -static const device pipew_dev_storage = +const device dev_pipew_storage = {"", FH_PIPEW, "", 0, 0, 0, 0}; -static const device dev_fs = +const device dev_fs = {"", FH_FS, "", 0, 0, 0, 0}; -const device *bad_dev = wordlist + 131; -const device *cdrom_dev = wordlist + 241; -const device *cdrom_dev1 = wordlist + 285; -const device *clipboard_dev = wordlist + 352; -const device *conin_dev = wordlist + 315; -const device *conout_dev = wordlist + 344; -const device *console_dev = wordlist + 333; -const device *cygdrive_dev = &cygdrive_dev_storage; -const device *dgram_dev = &dgram_dev_storage; -const device *fifo_dev = wordlist + 222; -const device *floppy_dev = wordlist + 214; -const device *fs_dev = &fs_dev_storage; -const device *icmp_dev = &icmp_dev_storage; -const device *kmem_dev = wordlist + 288; -const device *mem_dev = wordlist + 246; -const device *ntape_dev = wordlist + 282; -const device *null_dev = wordlist + 358; -const device *oss_dsp_dev = wordlist + 291; -const device *pipe_dev = wordlist + 340; -const device *piper_dev = &piper_dev_storage; -const device *pipew_dev = &pipew_dev_storage; -const device *port_dev = wordlist + 357; -const device *proc_dev = &proc_dev_storage; -const device *process_dev = &process_dev_storage; -const device *ptym_dev = wordlist + 327; -const device *random_dev = wordlist + 316; -const device *rawdrive_dev = wordlist + 345; -const device *registry_dev = ®istry_dev_storage; -const device *sda_dev = wordlist + 248; -const device *sdb_dev = wordlist + 250; -const device *sdc_dev = wordlist + 294; -const device *sdd_dev = wordlist + 290; -const device *sde_dev = wordlist + 298; -const device *sdf_dev = wordlist + 251; -const device *sdg_dev = wordlist + 252; -const device *sdh_dev = wordlist + 284; -const device *sdi_dev = wordlist + 263; -const device *sdj_dev = wordlist + 258; -const device *sdk_dev = wordlist + 289; -const device *sdl_dev = wordlist + 309; -const device *sdm_dev = wordlist + 261; -const device *sdn_dev = wordlist + 274; -const device *sdo_dev = wordlist + 278; -const device *sdp_dev = wordlist + 300; -const device *sdq_dev = wordlist + 305; -const device *sdr_dev = wordlist + 293; -const device *sds_dev = wordlist + 275; -const device *sdt_dev = wordlist + 307; -const device *sdu_dev = wordlist + 287; -const device *sdv_dev = wordlist + 299; -const device *sdw_dev = wordlist + 286; -const device *sdx_dev = wordlist + 280; -const device *sdy_dev = wordlist + 266; -const device *sdz_dev = wordlist + 262; -const device *serial_dev = wordlist + 259; -const device *serial_dev1 = wordlist + 322; -const device *stream_dev = &stream_dev_storage; -const device *tape_dev = wordlist + 255; -const device *tcp_dev = &tcp_dev_storage; -const device *tty_dev = wordlist + 306; -const device *ttym_dev = wordlist + 320; -const device *ttys_dev = wordlist + 334; -const device *udp_dev = &udp_dev_storage; -const device *unix_dev = &unix_dev_storage; -const device *urandom_dev = wordlist + 326; -const device *windows_dev = wordlist + 325; -const device *zero_dev = wordlist + 310; +const device dev_bad_storage = wordlist[157]; +const device dev_cdrom_storage = wordlist[123]; +const device dev_cdrom1_storage = wordlist[127]; +const device dev_clipboard_storage = wordlist[190]; +const device dev_conin_storage = wordlist[231]; +const device dev_conout_storage = wordlist[207]; +const device dev_console_storage = wordlist[209]; +const device dev_fifo_storage = wordlist[168]; +const device dev_floppy_storage = wordlist[133]; +const device dev_kmem_storage = wordlist[174]; +const device dev_mem_storage = wordlist[120]; +const device dev_ntape_storage = wordlist[175]; +const device dev_null_storage = wordlist[233]; +const device dev_oss_dsp_storage = wordlist[132]; +const device dev_pipe_storage = wordlist[170]; +const device dev_port_storage = wordlist[228]; +const device dev_ptym_storage = wordlist[149]; +const device dev_random_storage = wordlist[288]; +const device dev_rawdrive_storage = wordlist[270]; +const device dev_sda_storage = wordlist[155]; +const device dev_sdb_storage = wordlist[154]; +const device dev_sdc_storage = wordlist[138]; +const device dev_sdd_storage = wordlist[171]; +const device dev_sde_storage = wordlist[185]; +const device dev_sdf_storage = wordlist[158]; +const device dev_sdg_storage = wordlist[165]; +const device dev_sdh_storage = wordlist[150]; +const device dev_sdi_storage = wordlist[137]; +const device dev_sdj_storage = wordlist[145]; +const device dev_sdk_storage = wordlist[179]; +const device dev_sdl_storage = wordlist[181]; +const device dev_sdm_storage = wordlist[128]; +const device dev_sdn_storage = wordlist[183]; +const device dev_sdo_storage = wordlist[161]; +const device dev_sdp_storage = wordlist[147]; +const device dev_sdq_storage = wordlist[180]; +const device dev_sdr_storage = wordlist[188]; +const device dev_sds_storage = wordlist[135]; +const device dev_sdt_storage = wordlist[178]; +const device dev_sdu_storage = wordlist[134]; +const device dev_sdv_storage = wordlist[163]; +const device dev_sdw_storage = wordlist[136]; +const device dev_sdx_storage = wordlist[142]; +const device dev_sdy_storage = wordlist[159]; +const device dev_sdz_storage = wordlist[169]; +const device dev_serial_storage = wordlist[106]; +const device dev_serial1_storage = wordlist[222]; +const device dev_tape_storage = wordlist[117]; +const device dev_tty_storage = wordlist[194]; +const device dev_ttym_storage = wordlist[197]; +const device dev_ttys_storage = wordlist[204]; +const device dev_urandom_storage = wordlist[262]; +const device dev_windows_storage = wordlist[219]; +const device dev_zero_storage = wordlist[257]; const device *unit_devices[] = { - wordlist + 241 /* cdrom */, - wordlist + 259 /* serial */, - wordlist + 320 /* ttym */, - wordlist + 334 /* ttys */, - wordlist + 214 /* floppy */, - &tcp_dev_storage /* tcp */, - wordlist + 345 /* rawdrive */, - wordlist + 255 /* tape */ + &wordlist[123] /* cdrom */, + &wordlist[106] /* serial */, + &wordlist[197] /* ttym */, + &wordlist[204] /* ttys */, + &wordlist[133] /* floppy */, + &dev_tcp_storage /* tcp */, + &wordlist[270] /* rawdrive */, + &wordlist[117] /* tape */ }; const device *uniq_devices[] = { - wordlist + 131 /* bad */, - &fs_dev_storage /* fs */, - &process_dev_storage /* process */, - ®istry_dev_storage /* registry */, - &proc_dev_storage /* proc */, - wordlist + 222 /* fifo */, - &pipew_dev_storage /* pipew */, - &piper_dev_storage /* piper */, - wordlist + 340 /* pipe */, - wordlist + 246 /* mem */, - wordlist + 288 /* kmem */, - wordlist + 358 /* null */, - wordlist + 310 /* zero */, - wordlist + 357 /* port */, - wordlist + 316 /* random */, - wordlist + 326 /* urandom */, - wordlist + 306 /* tty */, - wordlist + 333 /* console */, - wordlist + 327 /* ptym */, - wordlist + 344 /* conout */, - wordlist + 315 /* conin */, - wordlist + 352 /* clipboard */, - wordlist + 325 /* windows */, - wordlist + 291 /* oss_dsp */, - wordlist + 259 /* serial */ + &wordlist[157] /* bad */, + &dev_fs_storage /* fs */, + &dev_process_storage /* process */, + &dev_registry_storage /* registry */, + &dev_proc_storage /* proc */, + &wordlist[168] /* fifo */, + &dev_pipew_storage /* pipew */, + &dev_piper_storage /* piper */, + &wordlist[170] /* pipe */, + &wordlist[120] /* mem */, + &wordlist[174] /* kmem */, + &wordlist[233] /* null */, + &wordlist[257] /* zero */, + &wordlist[228] /* port */, + &wordlist[288] /* random */, + &wordlist[262] /* urandom */, + &wordlist[194] /* tty */, + &wordlist[209] /* console */, + &wordlist[149] /* ptym */, + &wordlist[207] /* conout */, + &wordlist[231] /* conin */, + &wordlist[190] /* clipboard */, + &wordlist[219] /* windows */, + &wordlist[132] /* oss_dsp */, + &wordlist[106] /* serial */ }; #ifdef __GNUC__ |