aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/os-Linux/file.c')
-rw-r--r--arch/um/os-Linux/file.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c
index c17bd6f7d674..07a750197bb0 100644
--- a/arch/um/os-Linux/file.c
+++ b/arch/um/os-Linux/file.c
@@ -266,6 +266,15 @@ int os_write_file(int fd, const void *buf, int len)
266 return n; 266 return n;
267} 267}
268 268
269int os_sync_file(int fd)
270{
271 int n = fsync(fd);
272
273 if (n < 0)
274 return -errno;
275 return n;
276}
277
269int os_file_size(const char *file, unsigned long long *size_out) 278int os_file_size(const char *file, unsigned long long *size_out)
270{ 279{
271 struct uml_stat buf; 280 struct uml_stat buf;