]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_io: set argmax to 1 for imap command
authorBrian Foster <bfoster@redhat.com>
Wed, 19 Feb 2014 00:52:24 +0000 (11:52 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 19 Feb 2014 00:52:24 +0000 (11:52 +1100)
The imap command supports an optional argument to specify the
number of inode records to capture per ioctl(), but argmax is
currently set to 0. This leads to an error if an argument is
provided on the command line. Set argmax to 1 to support the
optional argument.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
io/imap.c

index 0a4f14e9ae419e58b2ec8183dcb99a86c1a33e98..4f3f883504a16ef1e4fc7ed5d4e8b0c888c97280 100644 (file)
--- a/io/imap.c
+++ b/io/imap.c
@@ -67,7 +67,7 @@ imap_init(void)
        imap_cmd.name = "imap";
        imap_cmd.cfunc = imap_f;
        imap_cmd.argmin = 0;
-       imap_cmd.argmax = 0;
+       imap_cmd.argmax = 1;
        imap_cmd.args = _("[nentries]");
        imap_cmd.flags = CMD_NOMAP_OK;
        imap_cmd.oneline = _("inode map for filesystem of current file");