diff options
author | Christopher Faylor <me@cgf.cx> | 2001-05-31 09:25:46 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-05-31 09:25:46 +0400 |
commit | ecfb6f11bcfe614f890d7f9f5e6633b2178c45a4 (patch) | |
tree | fdc2f7012c9ff19d85b00b710af5ae84e7a3fe84 /winsup/cygwin/path.h | |
parent | b70261ef60e95d7d3db2b4246f2f7da932643d33 (diff) |
* path.cc (chdir): Always send unsigned chars to isspace since newlib's isspace
doesn't deal well with "negative" chars.
* fhandler.cc (fhandler_disk_file::open): Propagate remote status of file
garnered from path_conv. Move #! checking to fstat.
(fhandler_disk_file::fstat): Reorganize st_mode setting to eliminate
duplication. Move check for #! here from fhandler::open.
* fhandler.h (fhandler_base::isremote): New method.
(fhandler_base::set_isremote): Ditto.
(fhandler_base::set_execable_p): Also record "don't care if executable state".
(fhandler_base::dont_care_if_execable): New method.
* path.cc (path_conv::check): Clear new flags. Appropriately set vol_flags,
drive_type, and is_remote_drive.
* path.h: Add new flags and methods for manipulating them.
* syscalls.cc (_unlink): Use isremote() to determine if a path is remote rather
than calling GetDriveType.
(stat_worker): Ditto.
* security.cc (get_file_attribute): Or attribute with result of NTReadEA to be
consistent with get_nt_attribute.
Diffstat (limited to 'winsup/cygwin/path.h')
-rw-r--r-- | winsup/cygwin/path.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 49b475993..ee23d9fd9 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -57,19 +57,24 @@ class path_conv { char path[MAX_PATH]; void add_ext_from_sym (symlink_info&); + bool is_remote_drive; public: unsigned path_flags; - - int isdisk () {return path_flags & PATH_ISDISK;} - int has_acls () {return path_flags & PATH_HASACLS;} - int has_symlinks () {return path_flags & PATH_HAS_SYMLINKS;} - int hasgood_inode () {return path_flags & PATH_HASACLS;} // Not strictly correct - int has_buggy_open () {return path_flags & PATH_HASBUGGYOPEN;} - int isbinary () {return path_flags & PATH_BINARY;} - int issymlink () {return path_flags & PATH_SYMLINK;} - int issocket () {return path_flags & PATH_SOCKET;} - int iscygexec () {return path_flags & PATH_CYGWIN_EXEC;} + DWORD vol_flags; + DWORD drive_type; + DWORD vol_serial; + + int isdisk () const { return path_flags & PATH_ISDISK;} + int isremote () const {return is_remote_drive;} + int has_acls () const {return path_flags & PATH_HASACLS;} + int has_symlinks () const {return path_flags & PATH_HAS_SYMLINKS;} + int hasgood_inode () const {return path_flags & PATH_HASACLS;} // Not strictly correct + int has_buggy_open () const {return path_flags & PATH_HASBUGGYOPEN;} + int isbinary () const {return path_flags & PATH_BINARY;} + int issymlink () const {return path_flags & PATH_SYMLINK;} + int issocket () const {return path_flags & PATH_SOCKET;} + int iscygexec () const {return path_flags & PATH_CYGWIN_EXEC;} executable_states exec_state () { extern int _check_for_executable; |