btrfs-progs/cmds
David Sterba ab32c4445d btrfs-progs: qgroup show: fix formatting of limit values in json output
There are reports that json output of 'qgroup show' crashes due to
internal error when printing the limit values:

  INTERNAL ERROR: unknown unit base, mode 2304
  btrfs(internal_error+0x10a)[0x5605c37ce48a]
  btrfs(pretty_size_snprintf+0x5c)[0x5605c37d105c]
  btrfs(fmt_print+0x44e)[0x5605c37d178e]
  btrfs(+0x7ed1d)[0x5605c3800d1d]
  btrfs(main+0x8f)[0x5605c379beff]
  /lib64/libc.so.6(+0x27bb0)[0x7f83924ddbb0]
  /lib64/libc.so.6(__libc_start_main+0x8b)[0x7f83924ddc79]
  btrfs(_start+0x25)[0x5605c379d405]
  common/units.c:82: pretty_size_snprintf: Assertion `0` failed, value 0
  btrfs(+0x1d4b1)[0x5605c379f4b1]
  btrfs(pretty_size_snprintf+0x7b)[0x5605c37d107b]
  btrfs(fmt_print+0x44e)[0x5605c37d178e]
  btrfs(+0x7ed1d)[0x5605c3800d1d]
  btrfs(main+0x8f)[0x5605c379beff]
  /lib64/libc.so.6(+0x27bb0)[0x7f83924ddbb0]
  /lib64/libc.so.6(__libc_start_main+0x8b)[0x7f83924ddc79]
  btrfs(_start+0x25)[0x5605c379d405]

This is caused by "size" format that requires the unit mode, but it was not
specified and some stack value used. As json prints the raw values, use
the plain %llu format.

Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1206960
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1209136#c15
Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-26 18:02:33 +02:00
..
balance.c btrfs-progs: sync uapi/btrfs.h into btrfs-progs 2023-05-26 18:02:28 +02:00
commands.h btrfs-progs: add new group reflink and command 2022-12-07 01:43:30 +01:00
device.c btrfs-progs: sync uapi/btrfs.h into btrfs-progs 2023-05-26 18:02:28 +02:00
filesystem-du.c btrfs-progs: introduce UASSERT() for purely userspace code 2023-05-26 18:02:28 +02:00
filesystem-usage.c btrfs-progs: introduce UASSERT() for purely userspace code 2023-05-26 18:02:28 +02:00
filesystem-usage.h btrfs-progs: sync uapi/btrfs.h into btrfs-progs 2023-05-26 18:02:28 +02:00
filesystem.c btrfs-progs: sync uapi/btrfs.h into btrfs-progs 2023-05-26 18:02:28 +02:00
inspect-dump-super.c btrfs-progs: inspect-internal: convert help text to option formatter 2023-02-28 20:11:24 +01:00
inspect-dump-tree.c btrfs-progs: dump-tree: skip tree-checker when dumpping tree blocks 2023-05-26 18:02:32 +02:00
inspect-tree-stats.c btrfs-progs: update read_tree_block to match the kernel definition 2023-05-26 18:02:30 +02:00
inspect.c btrfs-progs: inspect: fix warnings reported by -Wmissing-prototypes 2023-05-26 18:02:31 +02:00
property.c btrfs-progs: sync uapi/btrfs.h into btrfs-progs 2023-05-26 18:02:28 +02:00
props.h btrfs-progs: prop set: add force parameter 2021-10-07 18:40:24 +02:00
qgroup.c btrfs-progs: qgroup show: fix formatting of limit values in json output 2023-05-26 18:02:33 +02:00
qgroup.h btrfs-progs: sync uapi/btrfs.h into btrfs-progs 2023-05-26 18:02:28 +02:00
quota.c btrfs-progs: sync uapi/btrfs.h into btrfs-progs 2023-05-26 18:02:28 +02:00
receive-dump.c btrfs-progs: receive: add support for fs-verity 2022-10-11 09:08:08 +02:00
receive-dump.h btrfs-progs: cmds: update include lists 2022-10-11 09:07:59 +02:00
receive.c btrfs-progs: receive: output the parent subvolume uuid if it cannot be found 2023-05-26 18:02:31 +02:00
reflink.c btrfs-progs: fix -Wmissing-prototypes warnings 2023-05-26 18:02:31 +02:00
replace.c btrfs-progs: sync uapi/btrfs.h into btrfs-progs 2023-05-26 18:02:28 +02:00
rescue-chunk-recover.c btrfs-progs: add btrfs_locking_nest to btrfs_alloc_tree_block 2023-05-26 18:02:29 +02:00
rescue-super-recover.c btrfs-progs: cmds: update include lists 2022-10-11 09:07:59 +02:00
rescue.c btrfs-progs: pass root_id for btrfs_free_tree_block 2023-05-26 18:02:30 +02:00
rescue.h btrfs-progs: unify GPL header comments 2021-09-07 13:58:44 +02:00
restore.c btrfs-progs: make reada_for_search static 2023-05-26 18:02:30 +02:00
scrub.c btrfs-progs: sync uapi/btrfs.h into btrfs-progs 2023-05-26 18:02:28 +02:00
send.c btrfs-progs: sync uapi/btrfs.h into btrfs-progs 2023-05-26 18:02:28 +02:00
subvolume-list.c btrfs-progs: fix -Wmissing-prototypes warnings 2023-05-26 18:02:31 +02:00
subvolume.c btrfs-progs: sync uapi/btrfs.h into btrfs-progs 2023-05-26 18:02:28 +02:00