Skip to content

Commit

Permalink
* sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c (__fxstatat):
Browse files Browse the repository at this point in the history
	Return -1 on failure.
	* sysdeps/unix/sysv/linux/fchownat.c (fchownat): Likewise.
	* sysdeps/unix/sysv/linux/i386/fxstatat.c (__fxstatat): Likewise..
	* sysdeps/unix/sysv/linux/fxstatat64.c [__ASSUME_STAT64_SYSCALL]
	(__fxstatat64): Handle errors.
  • Loading branch information
Ulrich Drepper committed Nov 16, 2005
1 parent 7761a3a commit baf532c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
2005-11-15 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c (__fxstatat):
Return -1 on failure.
* sysdeps/unix/sysv/linux/fchownat.c (fchownat): Likewise.
* sysdeps/unix/sysv/linux/i386/fxstatat.c (__fxstatat): Likewise..
* sysdeps/unix/sysv/linux/fxstatat64.c [__ASSUME_STAT64_SYSCALL]
(__fxstatat64): Handle errors.

* io/sys/poll.h: Add comment explaining poll is a cancellation point.

* sysdeps/unix/sysv/linux/syscalls.list (epoll_wait): Align with
Expand Down
5 changes: 4 additions & 1 deletion sysdeps/unix/sysv/linux/fchownat.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ fchownat (fd, file, owner, group, flag)
result = INTERNAL_SYSCALL (chown, err, 3, file, owner, group);

if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
__atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
{
__atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
result = -1;
}

return result;
}
2 changes: 1 addition & 1 deletion sysdeps/unix/sysv/linux/fxstatat64.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
return __xstat64_conv (vers, &kst, st);

fail:
#endif
__atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);

return -1;
#endif
}
7 changes: 5 additions & 2 deletions sysdeps/unix/sysv/linux/i386/fxstatat.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ extern int __have_no_stat64;
int
__fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
{
if (flag & ~AT_SYMLINK_NOFOLLOW)
if (__builtin_expect (flag & ~AT_SYMLINK_NOFOLLOW, 0))
{
__set_errno (EINVAL);
return -1;
Expand Down Expand Up @@ -138,7 +138,10 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)

out:
if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
__atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
{
__atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
result = -1;
}

return result;
}
Expand Down
5 changes: 4 additions & 1 deletion sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
res = INTERNAL_SYSCALL (stat, err, 2, file, CHECK_1 (st));

if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (res, err), 0))
__atfct_seterrno (INTERNAL_SYSCALL_ERRNO (res, err), fd, buf);
{
__atfct_seterrno (INTERNAL_SYSCALL_ERRNO (res, err), fd, buf);
res = -1;
}

return res;
}
Expand Down

0 comments on commit baf532c

Please sign in to comment.