From patchwork Fri Dec 17 20:20:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 12685643 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FD66C433EF for ; Fri, 17 Dec 2021 20:20:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230455AbhLQUU4 (ORCPT ); Fri, 17 Dec 2021 15:20:56 -0500 Received: from sandeen.net ([63.231.237.45]:35340 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231339AbhLQUUx (ORCPT ); Fri, 17 Dec 2021 15:20:53 -0500 Received: from nas.sandeen.net (nas [10.0.0.37]) by sandeen.net (Postfix) with ESMTP id C2DCA4905 for ; Fri, 17 Dec 2021 14:20:26 -0600 (CST) From: Eric Sandeen To: linux-xfs@vger.kernel.org Subject: [PATCH] xfs_quota: fix up dump and report documentation Date: Fri, 17 Dec 2021 14:20:50 -0600 Message-Id: <20211217202050.14922-1-sandeen@sandeen.net> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Eric Sandeen Documentation for these commands was a bit of a mess. 1) The help args were respecified in the _help() functions, overwriting the strings which had been set up in the _init functions as all other commands do. Worse, in the report case, they differed. 2) The -L/-U dump options were not present in either short help string. 3) The -L/-U dump options were not documented in the xfs_quota manpage. Signed-off-by: Eric Sandeen Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- man/man8/xfs_quota.8 | 9 ++++++++- quota/report.c | 10 ++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/man/man8/xfs_quota.8 b/man/man8/xfs_quota.8 index 59e603f0..fd4562a1 100644 --- a/man/man8/xfs_quota.8 +++ b/man/man8/xfs_quota.8 @@ -393,7 +393,7 @@ option outputs the numeric ID instead of the name. The .B \-L and .B \-U -options specify lower and upper ID bounds to report on. If upper/lower +options specify lower and/or upper ID bounds to report on. If upper/lower bounds are specified, then by default only the IDs will be displayed in output; with the .B \-l @@ -558,6 +558,8 @@ report an error. [ .BR \-g " | " \-p " | " \-u ] [ +.BR \-L " | " \-U +] [ .B \-f .I file ] @@ -565,6 +567,11 @@ report an error. Dump out quota limit information for backup utilities, either to standard output (default) or to a .IR file . +The +.B \-L +and +.B \-U +options specify lower and/or upper ID bounds to dump. This is only the limits, not the usage information, of course. .HP .B restore diff --git a/quota/report.c b/quota/report.c index 6ac55490..2eb5b5a9 100644 --- a/quota/report.c +++ b/quota/report.c @@ -18,14 +18,14 @@ static cmdinfo_t report_cmd; static void dump_help(void) { - dump_cmd.args = _("[-g|-p|-u] [-f file]"); - dump_cmd.oneline = _("dump quota information for backup utilities"); printf(_( "\n" " create a backup file which contains quota limits information\n" " -g -- dump out group quota limits\n" " -p -- dump out project quota limits\n" " -u -- dump out user quota limits (default)\n" +" -L -- lower ID bound to dump\n" +" -U -- upper ID bound to dump\n" " -f -- write the dump out to the specified file\n" "\n")); } @@ -33,8 +33,6 @@ dump_help(void) static void report_help(void) { - report_cmd.args = _("[-bir] [-gpu] [-ahntlLNU] [-f file]"); - report_cmd.oneline = _("report filesystem quota information"); printf(_( "\n" " report used space and inodes, and quota limits, for a filesystem\n" @@ -757,7 +755,7 @@ report_init(void) dump_cmd.cfunc = dump_f; dump_cmd.argmin = 0; dump_cmd.argmax = -1; - dump_cmd.args = _("[-g|-p|-u] [-f file]"); + dump_cmd.args = _("[-g|-p|-u] [-LU] [-f file]"); dump_cmd.oneline = _("dump quota information for backup utilities"); dump_cmd.help = dump_help; dump_cmd.flags = CMD_FLAG_FOREIGN_OK; @@ -767,7 +765,7 @@ report_init(void) report_cmd.cfunc = report_f; report_cmd.argmin = 0; report_cmd.argmax = -1; - report_cmd.args = _("[-bir] [-gpu] [-ahnt] [-f file]"); + report_cmd.args = _("[-bir] [-gpu] [-ahntlLNU] [-f file]"); report_cmd.oneline = _("report filesystem quota information"); report_cmd.help = report_help; report_cmd.flags = CMD_FLAG_ONESHOT | CMD_FLAG_FOREIGN_OK;