diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/xstatconv.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/xstatconv.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/xstatconv.c b/sysdeps/unix/sysv/linux/xstatconv.c index 5aae78e0d5..6504414e1e 100644 --- a/sysdeps/unix/sysv/linux/xstatconv.c +++ b/sysdeps/unix/sysv/linux/xstatconv.c @@ -96,7 +96,8 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) break; default: - return INLINE_SYSCALL_ERROR_RETURN (-EINVAL, int, -1); + __set_errno (EINVAL); + return -1; } return 0; @@ -169,7 +170,8 @@ __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf) _STAT_VER_KERNEL does not make sense. */ case _STAT_VER_KERNEL: default: - return INLINE_SYSCALL_ERROR_RETURN (-EINVAL, int, -1); + __set_errno (EINVAL); + return -1; } return 0; @@ -199,13 +201,19 @@ __xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf) buf->st_ino = kbuf->st_ino; if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino) && buf->st_ino != kbuf->st_ino) - return INLINE_SYSCALL_ERROR_RETURN (-EOVERFLOW, int, -1); + { + __set_errno (EOVERFLOW); + return -1; + } } #else buf->st_ino = kbuf->st_ino; if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino) && buf->st_ino != kbuf->st_ino) - return INLINE_SYSCALL_ERROR_RETURN (-EOVERFLOW, int, -1); + { + __set_errno (EOVERFLOW); + return -1; + } #endif buf->st_mode = kbuf->st_mode; buf->st_nlink = kbuf->st_nlink; @@ -219,13 +227,19 @@ __xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf) /* Check for overflow. */ if (sizeof (buf->st_size) != sizeof (kbuf->st_size) && buf->st_size != kbuf->st_size) - return INLINE_SYSCALL_ERROR_RETURN (-EOVERFLOW, int, -1); + { + __set_errno (EOVERFLOW); + return -1; + } buf->st_blksize = kbuf->st_blksize; buf->st_blocks = kbuf->st_blocks; /* Check for overflow. */ if (sizeof (buf->st_blocks) != sizeof (kbuf->st_blocks) && buf->st_blocks != kbuf->st_blocks) - return INLINE_SYSCALL_ERROR_RETURN (-EOVERFLOW, int, -1); + { + __set_errno (EOVERFLOW); + return -1; + } #ifdef _HAVE_STAT_NSEC buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; @@ -261,7 +275,8 @@ __xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf) _STAT_VER_KERNEL does not make sense. */ case _STAT_VER_KERNEL: default: - return INLINE_SYSCALL_ERROR_RETURN (-EINVAL, int, -1); + __set_errno (EINVAL); + return -1; } return 0; |