[PATCH v4][ 2/2] erofs-utils: fix error handler notes when parameter miss

Gao Xiang hsiangkao at aol.com
Sat Oct 12 11:19:52 AEDT 2019


On Sat, Oct 12, 2019 at 01:09:53AM +0800, Li Guifu wrote:
> If a parameter isnot input, mkfs's error handler cannot give
> a correct notes, fix it.
> 
> Signed-off-by: Li Guifu <blucerlee at gmail.com>
> ---
>  mkfs/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mkfs/main.c b/mkfs/main.c
> index 77a4b78..adfc79c 100644
> --- a/mkfs/main.c
> +++ b/mkfs/main.c
> @@ -143,7 +143,7 @@ static int mkfs_parse_options_cfg(int argc, char *argv[])
>  	if (!cfg.c_img_path)
>  		return -ENOMEM;
>  
> -	if (optind > argc) {
> +	if (optind >= argc) {
>  		erofs_err("Source directory is missing");
>  		return -EINVAL;
>  	}
> -- 
> 2.17.1
>

Already applied.

Thanks,
Gao Xiang



More information about the Linux-erofs mailing list