From 79c9b824e49b47871ce101e8f32e2f3a13a981e7 Mon Sep 17 00:00:00 2001 From: Pawel Dziepak Date: Sun, 22 Dec 2013 23:14:51 +0100 Subject: [PATCH] libroot: sync() should not return any value --- headers/posix/unistd.h | 2 +- src/system/libroot/posix/unistd/sync.c | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/headers/posix/unistd.h b/headers/posix/unistd.h index 4cc5e3f967..dc5897efd0 100644 --- a/headers/posix/unistd.h +++ b/headers/posix/unistd.h @@ -189,7 +189,7 @@ extern ssize_t write_pos(int fd, off_t pos, const void *buffer,size_t count); extern ssize_t pwrite(int fd, const void *buffer, size_t count, off_t pos); extern off_t lseek(int fd, off_t offset, int whence); -extern int sync(void); +extern void sync(void); extern int fsync(int fd); extern int chown(const char *path, uid_t owner, gid_t group); diff --git a/src/system/libroot/posix/unistd/sync.c b/src/system/libroot/posix/unistd/sync.c index ed0acbba7d..3f56fe093b 100644 --- a/src/system/libroot/posix/unistd/sync.c +++ b/src/system/libroot/posix/unistd/sync.c @@ -22,14 +22,9 @@ fsync(int fd) } -int +void sync(void) { - int status = _kern_sync(); - if (status < 0) { - __set_errno(status); - status = -1; - } - - return status; + _kern_sync(); } +