simple_xattr_alloc(9)
β¨ simple_xattr_alloc(9) β¨
Okay bestie, welcome to the brain-meltingly iconic Kernel API Manual entry for simple_xattr_alloc π this one's short and sweet and honestly kind of a slay.
πΈ NAME πΈ
simple_xattr_alloc β allocate a new xattr object π
π¦ SYNOPSIS π¦
struct simple_xattr * simple_xattr_alloc (const void *value , size_t size );
Like, that's the whole signature. Copy it exactly, no cap. β¨
π ARGUMENTS π
valueβ the value of the xattr object. Yeah, that value. The actual payload.sizeβ the size ofvalue. Gotta tell it how big, obviously π«Ά
π DESCRIPTION π
So what it does is: allocate a new xattr object and initialize the respective members. That's it, that's the function. β¨
β οΈ But listen β the caller is responsible for handling the name of the xattr. Not this function. You. You handle the name. Don't forget and then come crying to me π
π RETURN π
- A new xattr object on success π
NULLifvalueisNULLπERR_PTRon failure π
Three outcomes, three vibes. Check your return value, bestie, fr fr.
π SEE ALSO π
Kernel file ./fs/xattr.c, plus the whole friend group:
may_write_xattr(9)__vfs_setxattr_noperm(9)__vfs_setxattr_locked(9)vfs_listxattr(9)__vfs_removexattr_locked(9)generic_listxattr(9)xattr_full_name(9)simple_xattr_space(9)simple_xattr_free(9)simple_xattr_free_rcu(9)simple_xattr_get(9)simple_xattr_set(9)simple_xattr_set_limited(9)simple_xattr_list(9)simple_xattr_add(9)simple_xattr_add_limited(9)simple_xattrs_free(9)simple_xattr_cache_cleanup(9)
Like a whole little xattr squad π§π
Mwah π thanks for reading, this page lives in ./fs and it's dated October 2026 β go forth and allocate responsibly, icon πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms