Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 0e4c54bcf..b73391d8f 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -3017,8 +3017,13 @@ fallocate (int fd, int mode, off_t offset, off_t len)
if (res == EISDIR)
res = ENODEV;
}
+ if (res)
+ {
+ set_errno (res);
+ res = -1;
+ }
syscall_printf ("%R = posix_fallocate(%d, %D, %D)", res, fd, offset, len);
- return 0;
+ return res;
}
extern "C" int