doc: rewrite examples for extended attributes

This commit is contained in:
CismonX 2025-01-02 16:53:57 +08:00
parent 34d66374cd
commit babeca2dcd
No known key found for this signature in database
GPG key ID: 3094873E29A482FB

View file

@ -277,18 +277,15 @@ The backend decides which attributes are available during initialization,
and all bookmark files share the same set of attributes. and all bookmark files share the same set of attributes.
All attributes have a @code{bookmarkfs.} name prefix. All attributes have a @code{bookmarkfs.} name prefix.
For example, to get the GUID of a bookmark file (Firefox backend) on GNU/Linux: For example, to get the GUID of a bookmark file (Firefox backend):
@example @example
$ getfattr --absolute-names -n user.bookmarkfs.guid \ // Linux
> /mnt/firefox/bookmarks/toolbar/Example len = fgetxattr(fd, "user.bookmarkfs.guid", buf, sizeof(buf));
@end example
The FreeBSD equivalent: // FreeBSD
len = extattr_get_fd(fd, EXTATTR_NAMESPACE_USER, "bookmarkfs.guid",
@example buf, sizeof(buf));
$ getextattr user bookmarkfs.guid \
> /mnt/firefox/bookmarks/toolbar/Example
@end example @end example