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.
This commit is contained in:
@ -1087,7 +1087,7 @@ private:
|
||||
tty_min *tc () const {return &(shared_console_info->tty_min_state);}
|
||||
|
||||
public:
|
||||
fhandler_console ();
|
||||
fhandler_console (fh_devices);
|
||||
static console_state *open_shared_console (HWND hw, HANDLE& h)
|
||||
{
|
||||
bool createit = false;
|
||||
@ -1124,7 +1124,7 @@ private:
|
||||
void set_close_on_exec (bool val);
|
||||
void set_input_state ();
|
||||
void send_winch_maybe ();
|
||||
tty_min *get_tty_stuff ();
|
||||
void get_tty_stuff ();
|
||||
bool set_unit ();
|
||||
static bool need_invisible ();
|
||||
static bool has_a () {return !invisible_console;}
|
||||
|
Reference in New Issue
Block a user