mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-11 03:31:17 +00:00
Add structures and API for unified output definition and multiple formatting backends. Currently there's plain text and json. The format of each row is defined in struct rowspec, selected using a key and formatted according to the type. There are extended types for eg. UUID or pretty size, while direct printf format specifiers work too. Due to different nature of the outputs, the context structure members are not always used. * text output mostly uses indentation and formats the name to a given width * json output tracks nesting depth and keeps stack of previous groups (list or array) and how many member have been printed, as the separators are allowed only between values and must not preced the group closing bracket the nesting depth is hardcoded to 16, counting the global group The API provides functions to print simple values and some helpers to format more complex structures. Signed-off-by: David Sterba <dsterba@suse.com> |
||
---|---|---|
.. | ||
format-output.c | ||
format-output.h | ||
fsfeatures.c | ||
fsfeatures.h | ||
help.c | ||
help.h | ||
internal.h | ||
messages.c | ||
messages.h | ||
rbtree-utils.c | ||
rbtree-utils.h | ||
string-table.c | ||
string-table.h | ||
task-utils.c | ||
task-utils.h | ||
utils.c | ||
utils.h |