Expand description
Shared extended-attribute type, used across every filesystem that carries POSIX-style xattrs (SquashFS, ext, XFS).
An xattr is a name in a namespace (user., trusted., security.,
system.) mapped to an arbitrary binary value. The canonical example
is security.capability — a packed struct granting a binary its Linux
capabilities (e.g. cap_net_raw on ping), which is why xattrs must survive
a SquashFS rebuild and why an editor exposes the raw bytes rather than
pretending the value is text.
Structs§
- Xattr
- One extended attribute: a fully-qualified name and its raw value bytes.
Constants§
- NAMESPACES
- A recognized xattr namespace prefix. A name without one of these cannot be represented on disk, so an editor rejects it up front.
Functions§
- has_
valid_ namespace - True when
namestarts with a representable namespace prefix. - hex_
encode - Lowercase hex, no separators.
- parse_
value - Parse a value written by a user:
0x-prefixed hex is decoded to raw bytes, anything else is taken as its UTF-8 bytes. The inverse ofXattr::value_displayfor round-tripping through an editor.