xfs
[Top] [All Lists]

Re: [PATCH] xfsprogs/io: set argmax to 1 for imap command

To: Brian Foster <bfoster@xxxxxxxxxx>, xfs@xxxxxxxxxxx
Subject: Re: [PATCH] xfsprogs/io: set argmax to 1 for imap command
From: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date: Tue, 07 Jan 2014 15:28:25 +0800
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1389021866-10793-1-git-send-email-bfoster@xxxxxxxxxx>
References: <1389021866-10793-1-git-send-email-bfoster@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0
On 01/06 2014 23:24 PM, Brian Foster wrote:
> 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@xxxxxxxxxx>
> ---
>  io/imap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/io/imap.c b/io/imap.c
> index 0a4f14e..4f3f883 100644
> --- 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");
> 
With this fix, the command behaviour is consistent with the help menu,
and the optional argument is useful to extend our test coverage.
Hence if no other objections, this patch looks good to me.

Reviewed-by: Jie Liu <jeff.liu@xxxxxxxxxx>

Thanks,
-Jeff

<Prev in Thread] Current Thread [Next in Thread>