pub fn setxattr(
inode: u64,
name: &str,
value: &[u8],
flags: u32,
) -> Result<(), KernelError>Expand description
Set (create or replace) an extended attribute.
flags controls behaviour when the attribute already exists or not:
| flags | Exists | Does not exist |
|---|---|---|
| 0 | Replace | Create |
XATTR_CREATE | Error | Create |
XATTR_REPLACE | Replace | Error |
Returns an error if value exceeds XATTR_MAX_VALUE_SIZE or the inode
already has XATTR_MAX_ATTRS_PER_INODE attributes.