diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-10-02 23:03:44 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-10-02 23:03:44 +0400 |
commit | 1da77c2678b3f69f2bc212e79df6432a9fffb61c (patch) | |
tree | 8555f453d363cac9164bc18873759a7fb9c11ed8 /winsup/cygwin/fhandler_disk_file.cc | |
parent | 1d694d8e5c51b5290f52f8ba1a410b686b2b333f (diff) |
* fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Simplify.
Just call nfs_fetch_fattr3 if called via fstat.
* nfs.cc (nfs_fetch_fattr3): New function to fetch NFS fattr3 info from
file handle.
* nfs.h (nfs_fetch_fattr3): Declare.
* path.cc (symlink_info::check): Simplify NFS case. Just call
nfs_fetch_fattr3.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 7f314ed19..13ed5ed5e 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -293,16 +293,6 @@ path_conv::ndisk_links (DWORD nNumberOfLinks) int __stdcall fhandler_base::fstat_by_nfs_ea (struct __stat64 *buf) { - NTSTATUS status; - IO_STATUS_BLOCK io; - struct { - FILE_FULL_EA_INFORMATION ffei; - char buf[sizeof (NFS_V3_ATTR) + sizeof (fattr3)]; - } ffei_buf; - struct { - FILE_GET_EA_INFORMATION fgei; - char buf[sizeof (NFS_V3_ATTR)]; - } fgei_buf; fattr3 *nfs_attr = pc.nfsattr (); if (get_io_handle ()) @@ -314,16 +304,7 @@ fhandler_base::fstat_by_nfs_ea (struct __stat64 *buf) NFS client. */ if (get_access () & GENERIC_WRITE) FlushFileBuffers (get_io_handle ()); - - fgei_buf.fgei.NextEntryOffset = 0; - fgei_buf.fgei.EaNameLength = sizeof (NFS_V3_ATTR) - 1; - stpcpy (fgei_buf.fgei.EaName, NFS_V3_ATTR); - status = NtQueryEaFile (get_io_handle (), &io, - &ffei_buf.ffei, sizeof ffei_buf, TRUE, - &fgei_buf.fgei, sizeof fgei_buf, NULL, TRUE); - if (NT_SUCCESS (status)) - nfs_attr = (fattr3 *) (ffei_buf.ffei.EaName - + ffei_buf.ffei.EaNameLength + 1); + nfs_fetch_fattr3 (get_io_handle (), nfs_attr); } buf->st_dev = nfs_attr->fsid; buf->st_ino = nfs_attr->fileid; |