summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/i386/fallocate.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2010-05-14 11:15:22 +0200
committerAndreas Schwab <schwab@redhat.com>2010-05-14 13:13:53 +0200
commite9691db5366a2990ccebf157c757ae60258b46d6 (patch)
treef17aa7f144b1acde14902700a13f95055bab6c70 /sysdeps/unix/sysv/linux/i386/fallocate.c
parent5e6e747fa224df1159f7eb32bc26d44cad0dbb17 (diff)
parent6d270188ef3fe10125b8723ed69ebdc9e90e914e (diff)
Merge remote branch 'origin/release/2.11/master' into fedora/2.11/master
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/fallocate.c')
-rw-r--r--sysdeps/unix/sysv/linux/i386/fallocate.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/fallocate.c b/sysdeps/unix/sysv/linux/i386/fallocate.c
index 14e788386c..1434a833f9 100644
--- a/sysdeps/unix/sysv/linux/i386/fallocate.c
+++ b/sysdeps/unix/sysv/linux/i386/fallocate.c
@@ -30,7 +30,13 @@ int
fallocate (int fd, int mode, __off_t offset, __off_t len)
{
#ifdef __NR_fallocate
- return __call_fallocate (fd, mode, offset, len);
+ int err = __call_fallocate (fd, mode, offset, len);
+ if (__builtin_expect (err, 0))
+ {
+ __set_errno (err);
+ err = -1;
+ }
+ return err;
#else
__set_errno (ENOSYS);
return -1;