diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-02-14 15:22:13 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-02-14 15:22:13 +0000 |
commit | 5401796acfc2b971a2f2c62eb43dab4ba540b0e5 (patch) | |
tree | 6a95d76b1976155e5d5b8c910a7c0d7822b0bd3c | |
parent | ab9108200f4dd4bda1e5e33d22f17cfb53dff243 (diff) | |
download | cygnal-5401796acfc2b971a2f2c62eb43dab4ba540b0e5.tar.gz cygnal-5401796acfc2b971a2f2c62eb43dab4ba540b0e5.tar.bz2 cygnal-5401796acfc2b971a2f2c62eb43dab4ba540b0e5.zip |
* fhandler_disk_file.cc (fhandler_cygdrive::fstat): Don't bother to
set st_nlink correctly, just set it to 1 to avoid potential network
timeouts.
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 10 |
2 files changed, 7 insertions, 9 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 495c15d79..80803f0b7 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,11 @@ 2012-02-14 Corinna Vinschen <corinna@vinschen.de> + * fhandler_disk_file.cc (fhandler_cygdrive::fstat): Don't bother to + set st_nlink correctly, just set it to 1 to avoid potential network + timeouts. + +2012-02-14 Corinna Vinschen <corinna@vinschen.de> + * flock.cc (lf_setlock): Don't close waited lock object handle before we own the node lock. Fix comment. diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index a418657e7..13b9d6919 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -2393,15 +2393,7 @@ fhandler_cygdrive::fstat (struct __stat64 *buf) fhandler_base::fstat (buf); buf->st_ino = 2; buf->st_mode = S_IFDIR | STD_RBITS | STD_XBITS; - if (!ndrives) - set_drives (); - char flptst[] = "X:"; - int n = ndrives; - for (const char *p = pdrive; p && *p; p = strchr (p, '\0') + 1) - if (is_floppy ((flptst[0] = *p, flptst)) - || GetFileAttributes (p) == INVALID_FILE_ATTRIBUTES) - n--; - buf->st_nlink = n + 2; + buf->st_nlink = 1; return 0; } |