From: Eric Sandeen <sandeen@redhat.com>
To: Eric Sandeen <sandeen@redhat.com>, linux-xfs <linux-xfs@vger.kernel.org>
Subject: [PATCH 1/5] xfs_io: fix inode command help and argsmax
Date: Fri, 30 Sep 2016 15:52:08 -0500 [thread overview]
Message-ID: <f485f5cb-084b-40e6-b7de-c469782b71b2@redhat.com> (raw)
In-Reply-To: <9f126dc7-3b1e-a1ed-7f23-48410a76adc2@redhat.com>
The short help implied that -n and -v were exclusive, and the longer
help wasn't particularly clear.
Further, argsmax is wrong; "-n -v num" is 3, not 2.
# xfs_io -c "inode -n -v 123" /mnt/test2
bad argument count 3 to inode, expected between 0 and 2 arguments
# xfs_io -c "inode -vn 123" /mnt/test2
128:32
Fix up all of those issues.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
io/open.c | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/io/open.c b/io/open.c
index 3eaa013..5efa739 100644
--- a/io/open.c
+++ b/io/open.c
@@ -757,16 +757,13 @@ inode_help(void)
{
printf(_(
"\n"
-"Query physical information about the inode"
+"Query physical information about an inode"
"\n"
-" Default: -- Return true(1) or false(0) if any inode greater than\n"
-" 32bits has been found in the filesystem\n"
-"[num] -- Return inode number [num] or 0 if the inode [num] is in use\n"
-" or not\n"
-" -n [num] -- Return the next valid inode after [num]\n"
-" -v -- verbose mode\n"
-" Display the inode number and its physical size (in bits)\n"
-" according to the argument used\n"
+" Default: -- Return 1 if any inode number greater than 32 bits exists in\n"
+" the filesystem, or 0 if none exist\n"
+" num -- Return inode number [num] if in use, or 0 if not in use\n"
+" -n num -- Return the next used inode after [num]\n"
+" -v -- Verbose mode - display returned inode number's size in bits\n"
"\n"));
}
@@ -956,9 +953,9 @@ open_init(void)
inode_cmd.name = "inode";
inode_cmd.cfunc = inode_f;
- inode_cmd.args = _("[-n | -v] [num]");
+ inode_cmd.args = _("[-nv] [num]");
inode_cmd.argmin = 0;
- inode_cmd.argmax = 2;
+ inode_cmd.argmax = 3;
inode_cmd.flags = CMD_NOMAP_OK;
inode_cmd.oneline =
_("Query inode number usage in the filesystem");
--
1.7.1
next prev parent reply other threads:[~2016-09-30 20:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-30 20:50 [PATCH 0/5] xfs_io: address various "inode" command issues Eric Sandeen
2016-09-30 20:52 ` Eric Sandeen [this message]
2016-09-30 20:53 ` [PATCH 2/5] xfs_io: factor out new get_last_inode() helper Eric Sandeen
2016-09-30 20:54 ` [PATCH 3/5] xfs_io: move inode command arg handling to top Eric Sandeen
2016-09-30 20:56 ` [PATCH 4/5] xfs_io: refactor inode command Eric Sandeen
2016-09-30 20:57 ` [PATCH 5/5] xfs_io: fix inode command with "-n" for bogus inode Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f485f5cb-084b-40e6-b7de-c469782b71b2@redhat.com \
--to=sandeen@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).