diff options
author | Christopher Faylor <cgf@redhat.com> | 2003-01-05 03:01:16 +0000 |
---|---|---|
committer | Christopher Faylor <cgf@redhat.com> | 2003-01-05 03:01:16 +0000 |
commit | 0f38f19ae0747aec7a7c787bb5c23f91d8912b1e (patch) | |
tree | 82da3e386b6c0a1c42cdf6a25008fd0e15d8eb14 /winsup | |
parent | 0a4674eb4503f1d44597f01e0260912b393d9a6f (diff) | |
download | gdb-0f38f19ae0747aec7a7c787bb5c23f91d8912b1e.tar.gz |
Replace is_fs_device with is_fs_special throughout.
* Makefile.in (DLL_OFILES): Add fhandler_fifo.o.
* devices.h (fh_devices): Renumber some minor numbers to fit in 8 bits.
* dtable.cc (dtable::build_fhandler): Handle FH_FIFO. Set errno to ENODEV if
device not found.
* dtable::find_fifo: Define new function.
* dtable.h (dtable::find_fifo): Declare new function.
* fhandler.cc (fhandler_base::device_access_denied): Fix O_RDONLY test.
(fhandler_base::write): Use output file handle for writing.
(fhandler_base::fstat): Use is_fs_special rather than is_fs_device.
* fhandler.h (fhandler_base::is_fs_special): Rename from is_fs_device.
(fhandler_pipe): Make private elements protected so that fhandler_fifo can use
them too.
(fhandler_pipe::create): New function derived from make_pipe.
(fhandler_fifo): Add more needed elements.
(fhandler_pty_master::slave): Add to track slave device.
(fhandler_pty_master::get_unit): Define.
* fhandler_tty.cc (fhandler_tty_master::init): Register slave device.
(fhandler_pty_master::open): Ditto.
(symlink_info::parse_device): Handle fifo specially.
* pinfo.cc (_pinfo::commune_recv): Initial fifo implementation.
(_pinfo::commune_send): Ditto.
* pinfo.h (picom): Add PICOM_FIFO.
* pipe.cc (fhandler_pipe::close): Close input handle here specifically.
(fhandler_pipe::create): Rename from make_pipe. Create fhandlers rather than
fds.
(pipe): Use fhandler_pipe::create to create pipe.
(_pipe): Ditto.
* syscalls.cc (mknod): Accommodate fifos.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/devices.h | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/winsup/cygwin/devices.h b/winsup/cygwin/devices.h index d6b5f5a16c1..ba8f03b962e 100644 --- a/winsup/cygwin/devices.h +++ b/winsup/cygwin/devices.h @@ -19,12 +19,11 @@ typedef __dev32_t _dev_t; enum fh_devices { - /* "Slow" devices */ FH_TTY = FHDEV (5, 0), FH_CONSOLE = FHDEV (5, 1), - FH_CONIN = FHDEV (5, 512), - FH_CONOUT = FHDEV (5, 513), FH_PTYM = FHDEV (5, 2), /* /dev/ptmx */ + FH_CONIN = FHDEV (5, 255), + FH_CONOUT = FHDEV (5, 254), DEV_TTYM_MAJOR = 128, FH_TTYM = FHDEV (DEV_TTYM_MAJOR, 0), @@ -37,15 +36,19 @@ enum fh_devices DEV_SERIAL_MAJOR = 117, FH_SERIAL = FHDEV (117, 0), /* /dev/ttyS? */ - FH_PIPE = FHDEV (0, 512), - FH_PIPER = FHDEV (0, 513), - FH_PIPEW = FHDEV (0, 514), - FH_FIFO = FHDEV (0, 515), - FH_SOCKET = FHDEV (0, 516), - FH_WINDOWS = FHDEV (13, 512), + FH_WINDOWS = FHDEV (13, 255), + FH_CLIPBOARD=FHDEV (13, 254), - /* Fast devices */ - FH_FS = FHDEV (0, 517), /* filesystem based device */ + FH_PIPE = FHDEV (0, 255), + FH_PIPER = FHDEV (0, 254), + FH_PIPEW = FHDEV (0, 253), + FH_FIFO = FHDEV (0, 252), + FH_SOCKET = FHDEV (0, 251), + FH_PROC = FHDEV (0, 250), + FH_REGISTRY= FHDEV (0, 249), + FH_PROCESS = FHDEV (0, 248), + + FH_FS = FHDEV (0, 247), /* filesystem based device */ DEV_FLOPPY_MAJOR = 2, FH_FLOPPY = FHDEV (DEV_FLOPPY_MAJOR, 0), @@ -68,7 +71,6 @@ enum fh_devices FH_PORT = FHDEV (1, 5), FH_RANDOM = FHDEV (1, 8), FH_URANDOM = FHDEV (1, 9), - FH_CLIPBOARD=FHDEV (13, 513), FH_OSS_DSP = FHDEV (14, 3), DEV_CYGDRIVE_MAJOR = 30, @@ -76,10 +78,6 @@ enum fh_devices FH_CYGDRIVE_A= FHDEV (DEV_CYGDRIVE_MAJOR, 'a'), FH_CYGDRIVE_Z= FHDEV (DEV_CYGDRIVE_MAJOR, 'z'), - FH_PROC = FHDEV (0, 519), - FH_REGISTRY= FHDEV (0, 520), - FH_PROCESS = FHDEV (0, 521), - DEV_RAWDRIVE_MAJOR = 65, FH_RAWDRIVE= FHDEV (DEV_RAWDRIVE_MAJOR, 0), |