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-11-22 17:19:50 +0300
committerCorinna Vinschen <corinna@vinschen.de>2010-11-22 17:19:50 +0300
commitfc0fb0ba1306e5f939cb0061243b70b2cb4f378d (patch)
treea704fdd0696b20cf08f92d1615d3a1408fac7c40 /winsup/cygwin
parent9dda712bd90f36d2119b20f5dd63babc1bd4d7a9 (diff)
* mount.cc (NETAPP_IGNORE): Add FILE_PERSISTENT_ACLS.
(FS_IS_NETAPP_DATAONTAP): Drop test for FILE_PERSISTENT_ACLS. (fs_info::update): Set filetype to ntfs in remote case, too. Fix a couple of comments. Add test for Netapps faking to be FAT. * mount.h (IMPLEMENT_FS_FLAG): Simplify definition and usage.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/mount.cc22
-rw-r--r--winsup/cygwin/mount.h32
3 files changed, 38 insertions, 25 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index d4011bdad..9625363e4 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,14 @@
2010-11-22 Corinna Vinschen <corinna@vinschen.de>
+ * mount.cc (NETAPP_IGNORE): Add FILE_PERSISTENT_ACLS.
+ (FS_IS_NETAPP_DATAONTAP): Drop test for FILE_PERSISTENT_ACLS.
+ (fs_info::update): Set filetype to ntfs in remote case, too. Fix a
+ couple of comments. Add test for Netapps faking to be FAT.
+
+ * mount.h (IMPLEMENT_FS_FLAG): Simplify definition and usage.
+
+2010-11-22 Corinna Vinschen <corinna@vinschen.de>
+
* net.cc (get_ipv4fromreg_ipcnt): Fix debug output. Only create debug
output if error is not ERROR_FILE_NOT_FOUND.
(get_ipv4fromreg): Ditto.
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc
index b862b5b17..3af8c51da 100644
--- a/winsup/cygwin/mount.cc
+++ b/winsup/cygwin/mount.cc
@@ -299,12 +299,12 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
| FILE_CASE_PRESERVED_NAMES \
| FILE_PERSISTENT_ACLS)
/* Netapp DataOnTap. */
-#define NETAPP_IGNORE FILE_SUPPORTS_SPARSE_FILES
+#define NETAPP_IGNORE (FILE_SUPPORTS_SPARSE_FILES \
+ | FILE_PERSISTENT_ACLS)
#define FS_IS_NETAPP_DATAONTAP TEST_GVI(flags () & ~NETAPP_IGNORE, \
FILE_CASE_SENSITIVE_SEARCH \
| FILE_CASE_PRESERVED_NAMES \
| FILE_UNICODE_ON_DISK \
- | FILE_PERSISTENT_ACLS \
| FILE_NAMED_STREAMS)
/* These are the minimal flags supported by NTFS since NT4. Every filesystem
not supporting these flags is not a native NTFS. We subsume them under
@@ -335,19 +335,23 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
samba_version (extended_info->samba_version);
}
}
- /* First check the remote filesystems faking to be NTFS. */
- if (!got_fs () && RtlEqualUnicodeString (&fsname, &ro_u_ntfs, FALSE)
+ /* First check the remote filesystems claiming to be NTFS. */
+ if (!got_fs ()
+ && is_ntfs (RtlEqualUnicodeString (&fsname, &ro_u_ntfs, FALSE))
/* Test for Samba on NT4 or for older Samba releases not supporting
extended info. */
&& !is_samba (FS_IS_SAMBA)
- /* Netapp inode info is unusable. */
+ /* Netapp inode info is unusable, can't handle trailing dots and
+ spaces, has a bug in "move and delete" semantics. */
&& !is_netapp (FS_IS_NETAPP_DATAONTAP))
/* Any other remote FS faking to be NTFS. */
is_cifs (!FS_IS_WINDOWS_NTFS);
- /* Then check the remote filesystems faking to be FAT. Right now all
- of them are subsumed under the "CIFS" filesystem type. */
+ /* Then check remote filesystems claiming to be FAT. Except for real
+ FAT and Netapp, all of them are subsumed under the "CIFS" filesystem
+ type for now. */
if (!got_fs ()
- && is_fat (RtlEqualUnicodePathPrefix (&fsname, &ro_u_fat, TRUE)))
+ && is_fat (RtlEqualUnicodePathPrefix (&fsname, &ro_u_fat, TRUE))
+ && !is_netapp (FS_IS_NETAPP_DATAONTAP))
is_cifs (!FS_IS_WINDOWS_FAT);
/* Then check remote filesystems honest about their name. */
if (!got_fs ()
@@ -383,7 +387,7 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
other filesystems like NFS.
UNUSED, but keep in for information purposes. */
has_buggy_basic_info (is_nwfs ());
- /* Netapp ans NWFS are too dumb to allow non-DOS filesystems
+ /* Netapp and NWFS are too dumb to allow non-DOS filenames
containing trailing dots and spaces when accessed from Windows
clients. We subsume CIFS into this class of filesystems right
away since at least some of them are not capable either. */
diff --git a/winsup/cygwin/mount.h b/winsup/cygwin/mount.h
index 35fce96d9..3ab18737d 100644
--- a/winsup/cygwin/mount.h
+++ b/winsup/cygwin/mount.h
@@ -37,9 +37,9 @@ extern struct fs_names_t {
bool block_device;
} fs_names[];
-#define IMPLEMENT_FS_FLAG(func, flag) \
- bool func (bool val) { if (val) status.fs_type = flag; return val; } \
- bool func () const { return status.fs_type == flag; }
+#define IMPLEMENT_FS_FLAG(type) \
+ bool is_##type (bool val) { if (val) status.fs_type = type; return val; } \
+ bool is_##type () const { return status.fs_type == type; }
class fs_info
{
@@ -84,19 +84,19 @@ class fs_info
IMPLEMENT_STATUS_FLAG (bool, has_buggy_fileid_dirinfo)
IMPLEMENT_STATUS_FLAG (bool, has_buggy_basic_info)
IMPLEMENT_STATUS_FLAG (bool, has_dos_filenames_only)
- IMPLEMENT_FS_FLAG (is_fat, fat)
- IMPLEMENT_FS_FLAG (is_ntfs, ntfs)
- IMPLEMENT_FS_FLAG (is_samba, samba)
- IMPLEMENT_FS_FLAG (is_nfs, nfs)
- IMPLEMENT_FS_FLAG (is_netapp, netapp)
- IMPLEMENT_FS_FLAG (is_cdrom, cdrom)
- IMPLEMENT_FS_FLAG (is_udf, udf)
- IMPLEMENT_FS_FLAG (is_csc_cache, csc_cache)
- IMPLEMENT_FS_FLAG (is_sunwnfs, sunwnfs)
- IMPLEMENT_FS_FLAG (is_unixfs, unixfs)
- IMPLEMENT_FS_FLAG (is_mvfs, mvfs)
- IMPLEMENT_FS_FLAG (is_cifs, cifs)
- IMPLEMENT_FS_FLAG (is_nwfs, nwfs)
+ IMPLEMENT_FS_FLAG (fat)
+ IMPLEMENT_FS_FLAG (ntfs)
+ IMPLEMENT_FS_FLAG (samba)
+ IMPLEMENT_FS_FLAG (nfs)
+ IMPLEMENT_FS_FLAG (netapp)
+ IMPLEMENT_FS_FLAG (cdrom)
+ IMPLEMENT_FS_FLAG (udf)
+ IMPLEMENT_FS_FLAG (csc_cache)
+ IMPLEMENT_FS_FLAG (sunwnfs)
+ IMPLEMENT_FS_FLAG (unixfs)
+ IMPLEMENT_FS_FLAG (mvfs)
+ IMPLEMENT_FS_FLAG (cifs)
+ IMPLEMENT_FS_FLAG (nwfs)
fs_info_type what_fs () const { return status.fs_type; }
ULONG serial_number () const { return sernum; }