summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/xstatconv.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-08-21 09:57:15 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-08-21 09:57:15 -0700
commite5dee2c896f04d88defdfa00282fa83f5f4004d8 (patch)
treecaebcffacffc0363dc418694eba18b2ce6b8617b /sysdeps/unix/sysv/linux/xstatconv.c
parent8c7c251746ce41779637c83e3b35639517f728d5 (diff)
downloadglibc-e5dee2c896f04d88defdfa00282fa83f5f4004d8.tar.gz
Revert "Add INLINE_SYSCALL_RETURN/INLINE_SYSCALL_ERROR_RETURN"
This reverts commit 0c5b8b5941e036dcaac69cecee9f01fdf9218e6e.
Diffstat (limited to 'sysdeps/unix/sysv/linux/xstatconv.c')
-rw-r--r--sysdeps/unix/sysv/linux/xstatconv.c29
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;