Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH 0/7] btrfs-progs: implement json output for subvolume subcommands
@ 2023-08-13  9:44 Christoph Heiss
  2023-08-13  9:44 ` [PATCH 1/7] btrfs-progs: common: document `time-long` output format Christoph Heiss
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Christoph Heiss @ 2023-08-13  9:44 UTC (permalink / raw)
  To: linux-btrfs

JSON as output format is already implement for some of the commands in
btrfs-progs, which is a very useful feature to have for e.g. scripting.

This series adds the same for `btrfs subvolume list`, `btrfs subvolume
get-default` and `btrfs subvolume show`.

#1-#3 are some small preparatory fixes & refactors, #4 introduces the
`struct rowspec` containing all fields needed by the series.

The actual implementation of the JSON output is mostly pretty
straight-forward, only cmd_subvolume_show() needed some refactoring
first.

I probably will go about implementing the same for more commands, but
wanted to get this out now to get some feedback.

Christoph Heiss (7):
  btrfs-progs: common: document `time-long` output format
  btrfs-progs: subvol show: remove duplicated quotas error check
  btrfs-progs: subvol show: factor out text printing to own function
  btrfs-progs: subvol: introduce rowspec definition for json output
  btrfs-progs: subvol list: implement json format output
  btrfs-progs: subvol get-default: implement json format output
  btrfs-progs: subvol show: implement json format output

 cmds/subvolume-list.c  |  91 ++++++++++-
 cmds/subvolume.c       | 345 +++++++++++++++++++++++++++++------------
 cmds/subvolume.h       |  19 +++
 common/format-output.h |   2 +
 4 files changed, 357 insertions(+), 100 deletions(-)
 create mode 100644 cmds/subvolume.h

--
2.41.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-08-21 15:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-13  9:44 [PATCH 0/7] btrfs-progs: implement json output for subvolume subcommands Christoph Heiss
2023-08-13  9:44 ` [PATCH 1/7] btrfs-progs: common: document `time-long` output format Christoph Heiss
2023-08-13  9:44 ` [PATCH 2/7] btrfs-progs: subvol show: remove duplicated quotas error check Christoph Heiss
2023-08-13  9:44 ` [PATCH 3/7] btrfs-progs: subvol show: factor out text printing to own function Christoph Heiss
2023-08-13  9:44 ` [PATCH 4/7] btrfs-progs: subvol: introduce rowspec definition for json output Christoph Heiss
2023-08-13  9:45 ` [PATCH 5/7] btrfs-progs: subvol list: implement json format output Christoph Heiss
2023-08-17 19:59   ` David Sterba
2023-08-13  9:45 ` [PATCH 6/7] btrfs-progs: subvol get-default: " Christoph Heiss
2023-08-17 20:04   ` David Sterba
2023-08-18 18:49     ` Christoph Heiss
2023-08-13  9:45 ` [PATCH 7/7] btrfs-progs: subvol show: " Christoph Heiss
2023-08-17 20:02   ` David Sterba
2023-08-17 19:34 ` [PATCH 0/7] btrfs-progs: implement json output for subvolume subcommands David Sterba
2023-08-18 18:39   ` Christoph Heiss
2023-08-21 15:19     ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox