EXTATTR(3)
π
extattr(3) β Library Functions Manual π
okay bestie, welcome to the extattr(3) page β the Library Functions Manual one, obviously. We're gonna make extended attribute namespace conversion make sense, fr fr. π
πΈ NAME πΈ
extattr_namespace_to_string,extattr_string_to_namespaceβ convert an extended attribute namespace identifier to a string and vice versa. periodt. β¨
π§ LIBRARY π§
System Utilities Library (libutil, -lutil) β yes bestie, that's the one. π«Ά
π SYNOPSIS π
#include <sys/extattr.h>
#include <libutil.h>
int
extattr_namespace_to_string(int attrnamespace, char **string);
int
extattr_string_to_namespace(const char *string, int *attrnamespace);
π¦ DESCRIPTION π¦
okay so extattr_namespace_to_string() takes a VFS extended attribute identifier and turns it into a human-readable string. Cute. And extattr_string_to_namespace() literally undoes that whole operation: it takes a human-readable string that represents a namespace and converts it into a namespace identifier. Iconic teamwork. π
Now, a file system may implement arbitrary namespaces, but these functions only support two: EXTATTR_NAMESPACE_USER (βuserβ) and EXTATTR_NAMESPACE_SYSTEM (βsystemβ). Both are defined in extattr(9). That's the vibe check, no cap. π
These functions are meant to be used in error reporting and other interactive tasks. For example, instead of printing the integer identifying an extended attribute in an error message, a program might use extattr_namespace_to_string() to obtain a human-readable representation. Likewise, instead of requiring a user to enter the integer representing a namespace, an interactive program might ask for a name and use extattr_string_to_namespace() to get the desired identifier. main character energy for error messages, honestly. π
π RETURN VALUES π
If any of the calls are unsuccessful, the value -1 is returned and the global variable errno is set to indicate the error. That's it β no cap. If it's a flop, you get -1 and errno spills the tea. π
π ERRORS π
[EINVAL]β The requested namespace could not be identified.
π₯ SEE ALSO π₯
go check these out bestie:
π HISTORY π
Extended attribute support was developed as part of the TrustedBSD Project, and introduced in FreeBSD 5.0. It was developed to support security extensions requiring additional labels to be associated with each file or directory. history lesson slay. π«Ά
mwah π β from the Debian crew, dated June 24, 2001, and it's the EXTATTR(3) page. bye bestie, go convert some namespaces ππ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2001 Dima Dorfman <dd@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms