* 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.
This commit is contained in:
Corinna Vinschen
2005-02-20 13:28:23 +00:00
parent 2b09be25a3
commit 4944ca2f09
7 changed files with 110 additions and 16 deletions

View File

@ -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;
}