libc: sync before calling ftruncate()

Issue #2695
This commit is contained in:
Christian Helmuth 2018-03-01 15:23:41 +01:00
parent d67e369433
commit db23227ac3

View File

@ -830,6 +830,7 @@ int Libc::Vfs_plugin::ioctl(Libc::File_descriptor *fd, int request, char *argp)
int Libc::Vfs_plugin::ftruncate(Libc::File_descriptor *fd, ::off_t length)
{
Vfs::Vfs_handle *handle = vfs_handle(fd);
_vfs_sync(handle);
typedef Vfs::File_io_service::Ftruncate_result Result;