From 56551a9bfbb369e29b12d1b60dc810cd5a3356b9 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 10 Apr 2004 13:45:10 +0000 Subject: * Use new unified status_flag accessor methods from classes fhandler_*, tty_min, mtinfo and fs_info thoroughout. * fhandler.h: Redefine all set_close_on_exec methods to take a bool argument. (enum conn_state): Rename from connect_state. (class fhandler_base): Rename some status flags to align with accessor method names. Drop encoded flag entirely. Unify status accessor methods. Const'ify all read accessor methods. (class fhandler_socket): Ditto. (class fhandler_dev_raw): Ditto. * fhandler_disk_file.cc (fhandler_base::fstat_fs): Use fs.fs_is_fat() instead of evaluating FATness of file system here. (fhandler_disk_file::opendir): Drop call to set_encoded(). (fhandler_disk_file::readdir): Use pc.isencoded() directly. * mtinfo.h (class mtinfo_drive): Const'ify all read accessor methods. * path.cc (fsinfo_cnt): Add. (fs_info::update): Accomodate class changes. Evaluate file system name specific flags right here. Add thread safety for reading and writing global fsinfo array. * path.h (enum path_types): Drop values for flags kept in fs already. (struct fs_info): Move status informatin into private struct type status_flags. Add accessor methods. Remove path and file system name string arrays in favor of status bits. (class path_conv): Use new fs_info status information where appropriate. (path_conf::fs_has_ea): Rename from fs_fast_ea. (path_conf::fs_has_acls): New method. (path_conf::root_dir): Remove. (path_conf::volname): Remove. * syscalls (statfs): Evaluate root dir locally. * tty.h (class tty_min): Unify status accessor methods. Const'ify all read accessor methods. --- winsup/cygwin/fhandler_tty.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'winsup/cygwin/fhandler_tty.cc') diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index df074a44e..717a9924d 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -440,7 +440,7 @@ process_ioctl (void *) fhandler_tty_slave::fhandler_tty_slave () : fhandler_tty_common () { - set_r_no_interrupt (1); + uninterruptible_io (true); } /* FIXME: This function needs to close handles when it has @@ -1334,10 +1334,10 @@ fhandler_pty_master::ptsname () } void -fhandler_tty_common::set_close_on_exec (int val) +fhandler_tty_common::set_close_on_exec (bool val) { if (archetype) - set_close_on_exec_flag (val); + close_on_exec (val); else { if (output_done_event) @@ -1359,7 +1359,7 @@ fhandler_tty_common::set_close_on_exec (int val) It is here because we need to specify the "from_pty" stuff here or we'll get warnings from ForceCloseHandle when debugging. */ set_no_inheritance (get_io_handle (), val); - set_close_on_exec_flag (val); + close_on_exec (val); #endif } } @@ -1391,7 +1391,7 @@ fhandler_tty_common::fixup_after_fork (HANDLE parent) } void -fhandler_pty_master::set_close_on_exec (int val) +fhandler_pty_master::set_close_on_exec (bool val) { fhandler_tty_common::set_close_on_exec (val); @@ -1414,6 +1414,6 @@ fhandler_tty_master::init_console () console->init (INVALID_HANDLE_VALUE, GENERIC_READ | GENERIC_WRITE, O_BINARY); cygheap->open_fhs--; /* handled when individual fds are opened */ - console->set_r_no_interrupt (1); + console->uninterruptible_io (true); return 0; } -- cgit v1.2.3