diff options
Diffstat (limited to 'arch/um/os-Linux/file.c')
-rw-r--r-- | arch/um/os-Linux/file.c | 9 |
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 | ||
269 | int os_sync_file(int fd) | ||
270 | { | ||
271 | int n = fsync(fd); | ||
272 | |||
273 | if (n < 0) | ||
274 | return -errno; | ||
275 | return n; | ||
276 | } | ||
277 | |||
269 | int os_file_size(const char *file, unsigned long long *size_out) | 278 | int os_file_size(const char *file, unsigned long long *size_out) |
270 | { | 279 | { |
271 | struct uml_stat buf; | 280 | struct uml_stat buf; |