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-01-12 17:47:46 +0300
committerCorinna Vinschen <corinna@vinschen.de>2010-01-12 17:47:46 +0300
commitc04ed45d82f5bcf20b2018f6b92b27a0e95aae72 (patch)
treed5ecf15864d821eb26d012eac6f7171eda6403e9 /winsup/cygwin/mount.cc
parent4ee93264fd8e7fbad277026a21bc7f3f14f4b333 (diff)
* globals.cc (ro_u_nwfs): New R/O unicode string.
* mount.cc (fs_info::update): Check for NWFS filesystem. Set has_buggy_basic_info, if so. Add comment to explain why. (fillout_mntent): Add "nwfs" string to fs_names array. * mount.h (enum fs_info_type): Add nwfs. (class fs_info): Add has_buggy_basic_info status flag. Add accessors for has_buggy_basic_info and is_nwfs. * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Accommodate filesystems with broken FileBasicInformation handling. * path.cc (symlink_info::check): Ditto. * path.h (path_conv::has_buggy_basic_info): Add method.
Diffstat (limited to 'winsup/cygwin/mount.cc')
-rw-r--r--winsup/cygwin/mount.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc
index b99a9b811..63507e78c 100644
--- a/winsup/cygwin/mount.cc
+++ b/winsup/cygwin/mount.cc
@@ -1,7 +1,7 @@
/* mount.cc: mount handling.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009 Red Hat, Inc.
+ 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
This file is part of Cygwin.
@@ -289,6 +289,7 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
&& !is_ntfs (RtlEqualUnicodeString (&fsname, &ro_u_ntfs, FALSE))
&& !is_fat (RtlEqualUnicodePathPrefix (&fsname, &ro_u_fat, TRUE))
&& !is_csc_cache (RtlEqualUnicodeString (&fsname, &ro_u_csc, FALSE))
+ && !is_nwfs (RtlEqualUnicodeString (&fsname, &ro_u_nwfs, FALSE))
&& is_cdrom (ffdi.DeviceType == FILE_DEVICE_CD_ROM))
is_udf (RtlEqualUnicodeString (&fsname, &ro_u_udf, FALSE));
if (!got_fs ())
@@ -300,8 +301,14 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
strlwr (fsn);
}
has_acls (flags () & FS_PERSISTENT_ACLS);
- /* Netapp inodes numbers are fly-by-night. */
+ /* Netapp inode numbers are fly-by-night. */
hasgood_inode ((has_acls () && !is_netapp ()) || is_nfs ());
+ /* NWFS is known to have a broken FileBasicInformation info class. It
+ can't be used to fetch information, only to set information. Therefore,
+ for NWFS we have to fallback to the FileNetworkOpenInformation info
+ class. Unfortunately we can't use FileNetworkOpenInformation all the
+ time since that fails on other filesystems like NFS. */
+ has_buggy_basic_info (is_nwfs ());
/* Case sensitivity is supported if FILE_CASE_SENSITIVE_SEARCH is set,
except on Samba which handles Windows clients case insensitive.
@@ -1443,7 +1450,8 @@ fillout_mntent (const char *native_path, const char *posix_path, unsigned flags)
"sunwnfs",
"unixfs",
"mvfs",
- "cifs"
+ "cifs",
+ "nwfs"
};
if (mntinfo.what_fs () > 0 && mntinfo.what_fs () < max_fs_type)