|
Message-Id: <1436443136-12394-1-git-send-email-ncopa@alpinelinux.org> Date: Thu, 9 Jul 2015 13:58:56 +0200 From: Natanael Copa <ncopa@...inelinux.org> To: musl@...ts.openwall.com Cc: Natanael Copa <ncopa@...inelinux.org> Subject: [PATCH] syncfs: return a status integer syncfs(2) may fail with EBADF if fd is not a vaild file descriptor. We need return error to follow glibc ABI. --- include/unistd.h | 2 +- src/linux/syncfs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/unistd.h b/include/unistd.h index 0fe75d5..760a165 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -185,7 +185,7 @@ int setresgid(gid_t, gid_t, gid_t); int getresuid(uid_t *, uid_t *, uid_t *); int getresgid(gid_t *, gid_t *, gid_t *); char *get_current_dir_name(void); -void syncfs(int); +int syncfs(int); int euidaccess(const char *, int); int eaccess(const char *, int); #endif diff --git a/src/linux/syncfs.c b/src/linux/syncfs.c index fe2b8a7..047bcff 100644 --- a/src/linux/syncfs.c +++ b/src/linux/syncfs.c @@ -2,7 +2,7 @@ #include <unistd.h> #include "syscall.h" -void syncfs(int fd) +int syncfs(int fd) { - __syscall(SYS_syncfs, fd); + return __syscall(SYS_syncfs, fd); } -- 2.4.5
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.