btrfs-progs/common
Jeff Mahoney a1a5000984 btrfs-progs: add support for output formats
This adds a global --format option to request extended output formats
from each command.

We currently only support text mode.  Command help reports what
output formats are available for each command.  Global help reports
what valid formats are.

If an invalid format is requested, an error is reported and lists the
valid formats.

Each command sets a bitmask that describes which formats it is capable
of outputting.  If a globally valid format is requested of a command
that doesn't support it, an error is reported and command usage dumped.

Commands don't need to specify that they support text output.  All
commands are required to output text.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
[ use global config instead of passing cmd_context ]
Signed-off-by: David Sterba <dsterba@suse.com>
2019-07-03 20:49:04 +02:00
..
fsfeatures.c btrfs-progs: move utils.[ch] to common/ 2019-07-03 20:49:04 +02:00
fsfeatures.h btrfs-progs: move fsfeatures.[ch] to common/ 2019-07-03 20:49:03 +02:00
help.c btrfs-progs: add support for output formats 2019-07-03 20:49:04 +02:00
help.h btrfs-progs: add support for output formats 2019-07-03 20:49:04 +02:00
internal.h
messages.c
messages.h
rbtree-utils.c btrfs-progs: move rbtree-utils.[ch] to common/ 2019-07-03 20:49:04 +02:00
rbtree-utils.h btrfs-progs: move rbtree-utils.[ch] to common/ 2019-07-03 20:49:04 +02:00
string-table.c btrfs-progs: move string-table.[ch] to common/ 2019-07-03 20:49:03 +02:00
string-table.h btrfs-progs: move string-table.[ch] to common/ 2019-07-03 20:49:03 +02:00
task-utils.c btrfs-progs: move task-utils.[ch] to common/ 2019-07-03 20:49:03 +02:00
task-utils.h btrfs-progs: move task-utils.[ch] to common/ 2019-07-03 20:49:03 +02:00
utils.c btrfs-progs: add support for output formats 2019-07-03 20:49:04 +02:00
utils.h btrfs-progs: add support for output formats 2019-07-03 20:49:04 +02:00