diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-09-13 11:17:36 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-09-13 11:17:36 +0000 |
commit | c80480bfa06d18700c434d034db4915fc358efab (patch) | |
tree | c08774b847b47bbc038cf551e8dbe7457ce1dd24 /winsup/cygwin/path.h | |
parent | f7382efe279a5cb5fa6dcb0021ba89e8ba98fb31 (diff) | |
download | cygnal-c80480bfa06d18700c434d034db4915fc358efab.tar.gz cygnal-c80480bfa06d18700c434d034db4915fc358efab.tar.bz2 cygnal-c80480bfa06d18700c434d034db4915fc358efab.zip |
* fhandler.h (class fhandler_base): Change inheritance of fstat_helper
and fstat_by_... methods to private.
(fhandler_base::fstat_helper): Drop all redundant arguments.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Drop call
to fstat_by_nfs_ea here. Drop fetching basic file information.
Drop setting file attributes. Accommodate change in fstat_helper call.
(fhandler_base::fstat_by_name): Simplify. Only fetch directory
information to get the inode number. Drop setting file attributes.
Accommodate change in fstat_helper call.
(fhandler_base::fstat_fs): Call fstat_by_nfs_ea if on NFS.
(fhandler_base::fstat_helper): Drop all redundant arguments. Use
information already collected in the fhandler. Move heading comment
into code and drop dwFileAttributes comment.
* mmap.cc (mmap64): Call fstat_fs rather than fstat_by_handle.
* mount.cc (fs_info::update): Note that has_buggy_basic_info is unused.
* path.cc (symlink_info::check_reparse_point): Add comment.
(symlink_info::check): Fetch FileNetworkOpenInformation rather than
FileBasicInformation throughout, except on NFS. Explain why. Store
FILE_NETWORK_OPEN_INFORMATION in conv_hdl. Remove
FILE_ATTRIBUTE_DIRECTORY attribute in conv_hdl for reparse point
symlinks.
* path.h (class path_conv_handle): Add FILE_NETWORK_OPEN_INFORMATION
member _fnoi.
(path_conv_handle::fnoi): New accessor method for _fnoi.
(path_conv::fnoi): New accessor method for cubv_hdl._fnoi.
* fhandler_tty.cc (fhandler_tty_slave::init): Use tty::setpgid method.
Diffstat (limited to 'winsup/cygwin/path.h')
-rw-r--r-- | winsup/cygwin/path.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 3650f7688..f832016e5 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -89,10 +89,24 @@ enum path_types PATH_SOCKET = 0x40000000 }; +class symlink_info; +struct _FILE_NETWORK_OPEN_INFORMATION; + class path_conv_handle { HANDLE hdl; ACCESS_MASK acc; + /* Identical to FILE_NETWORK_OPEN_INFORMATION. We don't want to pull in + ntdll.h here, though. */ + struct { + LARGE_INTEGER CreationTime; + LARGE_INTEGER LastAccessTime; + LARGE_INTEGER LastWriteTime; + LARGE_INTEGER ChangeTime; + LARGE_INTEGER AllocationSize; + LARGE_INTEGER EndOfFile; + ULONG FileAttributes; + } _fnoi; public: path_conv_handle () : hdl (NULL), acc (0) {} inline void set (HANDLE h, ACCESS_MASK a) { hdl = h; acc = a; } @@ -114,10 +128,10 @@ public: } inline HANDLE handle () const { return hdl; } inline ACCESS_MASK access () const { return acc; } + inline struct _FILE_NETWORK_OPEN_INFORMATION *fnoi () + { return (struct _FILE_NETWORK_OPEN_INFORMATION *) &_fnoi; } }; -class symlink_info; - class path_conv { DWORD fileattr; @@ -287,6 +301,7 @@ class path_conv HANDLE handle () const { return conv_handle.handle (); } ACCESS_MASK access () const { return conv_handle.access (); } + struct _FILE_NETWORK_OPEN_INFORMATION *fnoi () { return conv_handle.fnoi (); } void reset_conv_handle () { conv_handle.set (NULL, 0); } void close_conv_handle () { conv_handle.close (); } |