⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

setxattr

Function setxattr 

Source
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:

flagsExistsDoes not exist
0ReplaceCreate
XATTR_CREATEErrorCreate
XATTR_REPLACEReplaceError

Returns an error if value exceeds XATTR_MAX_VALUE_SIZE or the inode already has XATTR_MAX_ATTRS_PER_INODE attributes.