From e5dee2c896f04d88defdfa00282fa83f5f4004d8 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 21 Aug 2015 09:57:15 -0700 Subject: Revert "Add INLINE_SYSCALL_RETURN/INLINE_SYSCALL_ERROR_RETURN" This reverts commit 0c5b8b5941e036dcaac69cecee9f01fdf9218e6e. --- sysdeps/unix/sysv/linux/xstatconv.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'sysdeps/unix/sysv/linux/xstatconv.c') 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; -- cgit 1.4.1