* 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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user