On Wednesday 04 February 2015 10:12:06 Hu Tao wrote: > 'btrfs qgroup show' used to output bytes in raw, but in > btrfs-progs v3.18.2 it outputs bytes with suffix KiB, MiB > or like by default, which causes error when parsing the output. > > Fix it by adding '--raw' to let 'btrfs qgroup show' output raw numbers > always. > > Signed-off-by: Hu Tao <[email protected]> > --- > daemon/btrfs.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/daemon/btrfs.c b/daemon/btrfs.c > index 5cab52a..402b7de 100644 > --- a/daemon/btrfs.c > +++ b/daemon/btrfs.c > @@ -1231,6 +1231,7 @@ do_btrfs_qgroup_show (const char *path) > ADD_ARG (argv, i, str_btrfs); > ADD_ARG (argv, i, "qgroup"); > ADD_ARG (argv, i, "show"); > + ADD_ARG (argv, i, "--raw"); > ADD_ARG (argv, i, path_buf); > ADD_ARG (argv, i, NULL);
It seems that --raw has been added in btrfs-tools 0.18.2, so need to check for the availability of that parameter, and pass it only in that case. Thanks, -- Pino Toscano _______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
