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>2005-03-10 20:02:52 +0300
committerCorinna Vinschen <corinna@vinschen.de>2005-03-10 20:02:52 +0300
commit640c3ce5df63845cb038e7008000eb51ec99a702 (patch)
treed78058b4648f7826f7e4906ea67b23344401baba /winsup/cygwin/syscalls.cc
parent542afc349c83aadecde22dc7f561a8a0efcc5313 (diff)
* path.cc (is_floppy): New function.
(setmntent): Drop floppy drives on A: and B: from logical drive DWORD. * syscalls.cc (sync): Don't sync floppies on A: and B:.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 180a2e808..b2375e650 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -964,11 +964,14 @@ sync ()
}
else if (wincap.is_winnt ()) /* 9x has no concept for opening volumes */
{
- DWORD drives = GetLogicalDrives ();
+ extern FILE *setmntent (const char *, const char *);
+ setmntent ("", "");
+ DWORD drives = _my_tls.locals.available_drives;
DWORD mask = 1;
strcpy (vol, "\\\\.\\A:");
do
{
+ /* Geeh. Try to sync only non-floppy drives. */
if (drives & mask)
{
debug_printf ("Try volume %s", vol);