mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
hurd: Fix setxattr return value on replacing
When XATTR_REPLACE is set we shall succeed when the value already exists, and fail with ENODATA otherwise, instead of the converse.
This commit is contained in:
parent
ba5a23422a
commit
ed06248019
@ -158,10 +158,9 @@ _hurd_xattr_set (io_t port, const char *name, const void *value, size_t size,
|
||||
if (err)
|
||||
return err;
|
||||
if (bufsz > 0)
|
||||
{
|
||||
__munmap (buf, bufsz);
|
||||
return ENODATA;
|
||||
}
|
||||
__munmap (buf, bufsz);
|
||||
else
|
||||
return ENODATA;
|
||||
}
|
||||
return __file_set_translator (port,
|
||||
FS_TRANS_SET | ((flags & XATTR_CREATE)
|
||||
|
Loading…
Reference in New Issue
Block a user