search for: btrfs_qgroup_show_raw_opt

Displaying 2 results from an estimated 2 matches for "btrfs_qgroup_show_raw_opt".

2015 Mar 16
2
[PATCH] btrfs-qgroup-show: add check for "--raw"
...refix since v3.18.2, such as KiB; + * also introduced '--raw' to keep traditional behaviour. + * We could check wheter 'btrfs qgroup show' support '--raw' + * option by checking the output of + * 'btrfs qgroup show' support --help' command. + */ +static int +test_btrfs_qgroup_show_raw_opt (void) +{ + static int result = -1; + if (result > 0) + return result; + + CLEANUP_FREE char *err = NULL; + CLEANUP_FREE char *out = NULL; + + int r = commandr (&out, &err, str_btrfs, "qgroup", "show", "--help", NULL); + + if (r == -1) { + reply_...
2015 Mar 16
0
Re: [PATCH] btrfs-qgroup-show: add check for "--raw"
...gt; + * also introduced '--raw' to keep traditional behaviour. > + * We could check wheter 'btrfs qgroup show' support '--raw' > + * option by checking the output of > + * 'btrfs qgroup show' support --help' command. > + */ > +static int > +test_btrfs_qgroup_show_raw_opt (void) > +{ > + static int result = -1; > + if (result > 0) > + return result; This should check for result != -1, otherwise if --raw is not supported this function will be run fully (i.e. executing `btrfs`) every time. > + CLEANUP_FREE char *err = NULL; > + CLEANUP_FR...