]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_quota: fix report command parsing
authorDave Chinner <dchinner@redhat.com>
Fri, 9 Nov 2012 07:02:58 +0000 (07:02 +0000)
committerMark Tinguely <tinguely@eagdhcp-232-125.americas.sgi.com>
Tue, 20 Nov 2012 23:06:19 +0000 (17:06 -0600)
The report command line needs to be parsed as a whole not as
individual elements - report_f() is set up to do this correctly.
When treated as non-global command line, the report function is
called once for each command line arg, resulting in reports being
issued multiple times.

Set the command to be a global command so that it is only called
once.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
quota/report.c

index a1e165b0eb1a9fb7a1078436872451a94732ff6c..70894a2c5032bbd2f9727edae0b00f500c6ebd0e 100644 (file)
@@ -653,6 +653,7 @@ report_init(void)
        report_cmd.cfunc = report_f;
        report_cmd.argmin = 0;
        report_cmd.argmax = -1;
+       report_cmd.flags = CMD_FLAG_GLOBAL;
        report_cmd.args = _("[-bir] [-gpu] [-ahnt] [-f file]");
        report_cmd.oneline = _("report filesystem quota information");
        report_cmd.help = report_help;