Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-09-30 17:52:34 +0400
committerCorinna Vinschen <corinna@vinschen.de>2010-09-30 17:52:34 +0400
commit2d355410b7b59710e61b45e529900f9ebbd668e8 (patch)
tree2886afae145598a4242d7d59766c171e94494f99 /winsup/cygwin/path.h
parentab3cd8885800a6fcf60b0d503b402d55202257c6 (diff)
* fhandler.cc: Drop including nfs.h.
* fhandler_disk_file.cc: Ditto. (fhandler_base::fstat_by_nfs_ea): Use fattr3 from path_conv member, unless called from fstat. * path.cc: Drop including nfs.h. (symlink_info::check): Rearrange definition of file info buffers. Fetch fattr3 info for files on NFS and store in conv_hdl for later use in fhandler_base::fstat_by_nfs_ea. Use fattr3 file type to recognize symlink on NFS and try to fetch symlink target only for actual symlinks. * path.h: Include nfs.h. (class path_conv_handle): Change file info storage to union of FILE_NETWORK_OPEN_INFORMATION and fattr3 structures. (path_conv_handle::fnoi): Align to aforementioned change. (path_conv_handle::nfsattr): New method. (path_conv::nfsattr): New method.
Diffstat (limited to 'winsup/cygwin/path.h')
-rw-r--r--winsup/cygwin/path.h32
1 files changed, 20 insertions, 12 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
index fae721664..764381a4a 100644
--- a/winsup/cygwin/path.h
+++ b/winsup/cygwin/path.h
@@ -12,6 +12,7 @@ details. */
#include "devices.h"
#include "mount.h"
#include "cygheap_malloc.h"
+#include "nfs.h"
#include <sys/ioctl.h>
#include <fcntl.h>
@@ -96,17 +97,21 @@ 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;
+ union {
+ /* 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;
+ /* For NFS. */
+ fattr3 _fattr3;
+ } attribs;
public:
path_conv_handle () : hdl (NULL), acc (0) {}
inline void set (HANDLE h, ACCESS_MASK a) { hdl = h; acc = a; }
@@ -129,7 +134,9 @@ 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; }
+ { return (struct _FILE_NETWORK_OPEN_INFORMATION *) &attribs._fnoi; }
+ inline struct fattr3 *nfsattr ()
+ { return (struct fattr3 *) &attribs._fattr3; }
};
class path_conv
@@ -321,6 +328,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 (); }
+ struct fattr3 *nfsattr () { return conv_handle.nfsattr (); }
void reset_conv_handle () { conv_handle.set (NULL, 0); }
void close_conv_handle () { conv_handle.close (); }