mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 02:03:35 +08:00
hurd: Fix renameat2 error
renameat2 has to exclude RENAME_EXCHANGE | RENAME_NOREPLACE with EINVAL, as tested by stdio-common/tst-renameat2.
This commit is contained in:
parent
563202976e
commit
d51ca7d6ad
@ -30,6 +30,8 @@ __renameat2 (int oldfd, const char *old, int newfd, const char *new,
|
||||
const char *oldname, *newname;
|
||||
int excl = 0;
|
||||
|
||||
if ((flags & (RENAME_EXCHANGE | RENAME_NOREPLACE)) == (RENAME_EXCHANGE | RENAME_NOREPLACE))
|
||||
return __hurd_fail (EINVAL);
|
||||
if (flags & (RENAME_EXCHANGE | RENAME_WHITEOUT))
|
||||
return __hurd_fail (ENOSYS);
|
||||
if (flags & RENAME_NOREPLACE)
|
||||
|
Loading…
Reference in New Issue
Block a user