From c3a9063f838124aa2a00600ad040dacd53a96cb5 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 12 Jun 2011 20:15:26 +0000 Subject: Rename FH_BAD to FH_NADA throughout. * devices.h (FH_ERROR): New value. (iscons_dev): Extend to detect all the console device types. * devices.in: Set aside storage for FH_ERROR. * dtable.cc (dtable::init_std_file_from_handle): Use iscons_dev to detect when device is a console. (fh_alloc): Pass device to console constructor. (build_fh_pc): Short circuit when we detect that the constructor saw an error. * fhandler.h (fhandler_console::fhandler_console): Accept fh_devices parameter. (get_tty_stuff): Change to void. * fhandler_console (fhandler_console::set_unit): Set device to FH_ERROR on attempt to access anything other than the current console. (fhandler_console::get_tty_stuff): Change to void return. (fhandler_console::open): Return EPERM on FH_ERROR device type. (fhandler_console::fhandler_console): Set the device type appropriately before calling get_tty_stuff and rely on that function to reset it if necessary. --- winsup/cygwin/devices.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/devices.in') diff --git a/winsup/cygwin/devices.in b/winsup/cygwin/devices.in index 3b45840c4..3499b5b4c 100644 --- a/winsup/cygwin/devices.in +++ b/winsup/cygwin/devices.in @@ -56,7 +56,10 @@ const device dev_dgram_storage = {"", {FH_DGRAM}, ""}; const device dev_bad_storage = - {"", {FH_BAD}, ""}; + {"", {FH_NADA}, ""}; + +const device dev_error_storage = + {"", {FH_ERROR}, ""}; #define BRACK(x) {devn_int: x} %storage_here -- cgit v1.2.3