diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-02-20 13:28:23 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-02-20 13:28:23 +0000 |
commit | 4944ca2f090de13e5afbde071def7449b25dcfd5 (patch) | |
tree | 3b5bb55b18a0b6ae32a6cfa4e797be9fbaf0ff97 /winsup/cygwin/fhandler.cc | |
parent | 2b09be25a3929c8c6d7e23e1abb4756187c5036b (diff) | |
download | cygnal-4944ca2f090de13e5afbde071def7449b25dcfd5.tar.gz cygnal-4944ca2f090de13e5afbde071def7449b25dcfd5.tar.bz2 cygnal-4944ca2f090de13e5afbde071def7449b25dcfd5.zip |
* autoload.cc (FindFirstVolumeA): Add.
(FindNextVolumeA): Add.
(FindVolumeClose): Add.
(GetVolumePathNamesForVolumeNameA): Add.
* fhandler.h (class fhandler_base): Declare new method fsync.
* fhandler.cc (fhandler_base::fsync): New method.
* syscalls.cc (fsync): Move functionality into fhandler method fsync.
Just call this method from here.
(sync_worker): New static function.
(sync): Fill with life for NT systems.
* wincap.h (wincaps::has_guid_volumes): New element.
* wincap.cc: Implement above element throughout.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r-- | winsup/cygwin/fhandler.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 6a935fbec..e4089d64f 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1623,3 +1623,14 @@ fhandler_base::utimes (const struct timeval *tvp) set_errno (EINVAL); return -1; } + +int +fhandler_base::fsync () +{ + if (pc.isdir ()) /* Just succeed. */ + return 0; + if (FlushFileBuffers (get_handle ())) + return 0; + __seterrno (); + return -1; +} |