[PATCH 1/5] xfs_io: fix inode command help and argsmax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux