Always use INTERNAL_SYSCALL_ERRNO with INTERNAL_SYSCALL

This commit is contained in:
Andreas Schwab 2015-10-22 14:38:52 +02:00
parent 1ee1218e3f
commit 751709fec9
7 changed files with 23 additions and 6 deletions

View File

@ -1,3 +1,14 @@
2015-10-22 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/i386/fxstat.c (__fxstat): Use
INTERNAL_SYSCALL_ERRNO.
* sysdeps/unix/sysv/linux/i386/fxstatat.c (__fxstatat): Likewise.
* sysdeps/unix/sysv/linux/i386/lockf64.c (lockf64): Likewise.
* sysdeps/unix/sysv/linux/i386/lxstat.c (__lxstat): Likewise.
* sysdeps/unix/sysv/linux/i386/sigaction.c (__libc_sigaction):
Likewise.
* sysdeps/unix/sysv/linux/i386/xstat.c (__xstat): Likewise.
2015-10-21 Joseph Myers <joseph@codesourcery.com>
* io/tst-fcntl.c (fd): New static variable.

View File

@ -45,7 +45,8 @@ __fxstat (int vers, int fd, struct stat *buf)
INTERNAL_SYSCALL_DECL (err);
result = INTERNAL_SYSCALL (fstat64, err, 2, fd, &buf64);
if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err)))
return INLINE_SYSCALL_ERROR_RETURN_VALUE (-result);
return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
err));
else
return __xstat32_conv (vers, &buf64, buf);
}

View File

@ -43,7 +43,8 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
result = INTERNAL_SYSCALL (fstatat64, err, 4, fd, file, &st64, flag);
if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err)))
return INLINE_SYSCALL_ERROR_RETURN_VALUE (-result);
return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
err));
else
return __xstat32_conv (vers, &st64, st);
}

View File

@ -45,7 +45,8 @@ lockf64 (int fd, int cmd, off64_t len64)
INTERNAL_SYSCALL_DECL (err);
result = INTERNAL_SYSCALL (fcntl64, err, 3, fd, F_GETLK64, &fl64);
if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err)))
return INLINE_SYSCALL_ERROR_RETURN_VALUE (-result);
return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
err));
if (fl64.l_type == F_UNLCK || fl64.l_pid == __getpid ())
return 0;
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EACCES);

View File

@ -46,7 +46,8 @@ __lxstat (int vers, const char *name, struct stat *buf)
INTERNAL_SYSCALL_DECL (err);
result = INTERNAL_SYSCALL (lstat64, err, 2, name, &buf64);
if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err)))
return INLINE_SYSCALL_ERROR_RETURN_VALUE (-result);
return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
err));
else
return __xstat32_conv (vers, &buf64, buf);
}

View File

@ -74,7 +74,8 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
sig, act ? &kact : NULL,
oact ? &koact : NULL, _NSIG / 8);
if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err)))
return INLINE_SYSCALL_ERROR_RETURN_VALUE (-result);
return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
err));
else if (oact && result >= 0)
{
oact->sa_handler = koact.k_sa_handler;

View File

@ -46,7 +46,8 @@ __xstat (int vers, const char *name, struct stat *buf)
INTERNAL_SYSCALL_DECL (err);
result = INTERNAL_SYSCALL (stat64, err, 2, name, &buf64);
if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err)))
return INLINE_SYSCALL_ERROR_RETURN_VALUE (-result);
return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
err));
else
return __xstat32_conv (vers, &buf64, buf);
}