From f4e815bc30f3c7179b8a914bb043ce087d7ad988 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 24 Jan 2004 03:40:33 +0000 Subject: * cygheap.cc (init_cygheap::close_ctty): Protect YA vforkism. * fhandler.h (fhandler_base::has_acls): Make pass through for path_conv method. (fhandler_base::isremote): Ditto. (fhandler_base::is_fs_special): Ditto. (fhandler_base::has_attribute): Ditto. Define new function. (fhandler_base::fhaccess): Declare new function based on access_worker. (fhandler_base::set_has_acls): Eliminate obsolete function. (fhandler_base::set_isremote): Ditto. * fhandler.cc (fhandler_base::fhaccess): Move from syscalls.cc and into fhandler_base class. Use fhandler methods to access data rather than path_conv stuff. (fhandler_base::device_access_denied): Use fhaccess method. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto. (fhandler_base::open_fs): Remove calls to obsolete functions. * fhandler_virtual.cc (fhandler_virtual::open): Ditto. * winsup.h (access_worker): Remove obsolete access_worker declaration. *syscalls.cc (access_worker): Move function to fhandler.cc. (access): Use fhaccess method. * pinfo.cc (_pinfo::set_ctty): Clarify debugging output. * sigproc.cc (sig_dispatch_pending): Ditto. * syscalls.cc (setsid): Perform minor rearrangement. --- winsup/cygwin/fhandler.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'winsup/cygwin/fhandler.h') diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 9ce75fbc4..514609b45 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -108,7 +108,6 @@ class fhandler_base __ino64_t namehash; /* hashed filename, used as inode num */ protected: - /* Full unix path name of this file */ /* File open flags from open () and fcntl () calls */ int openflags; @@ -256,12 +255,11 @@ class fhandler_base int get_readahead_into_buffer (char *buf, size_t buflen); - bool has_acls () { return FHISSETF (HASACLS); } - void set_has_acls (int val) { FHCONDSETF (val, HASACLS); } + bool has_acls () const { return pc.has_acls (); } - bool isremote () { return FHISSETF (ISREMOTE); } - void set_isremote (int val) { FHCONDSETF (val, ISREMOTE); } + bool isremote () { return pc.isremote (); } + bool has_attribute (DWORD x) const {return pc.has_attribute (x);} const char *get_name () const { return pc.normalized_path; } const char *get_win32_name () { return pc.get_win32 (); } __ino64_t get_namehash () { return namehash; } @@ -364,8 +362,9 @@ class fhandler_base virtual int closedir (DIR *); virtual bool is_slow () {return 0;} bool is_auto_device () {return isdevice () && !dev ().isfs ();} - bool is_fs_special () {return dev ().isfs ();} - bool device_access_denied (int) __attribute__ ((regparm (1))); + bool is_fs_special () {return pc.is_fs_special ();} + bool device_access_denied (int) __attribute__ ((regparm (2))); + bool fhaccess (int flags) __attribute__ ((regparm (2))); }; class fhandler_socket: public fhandler_base -- cgit v1.2.3