Re: [PATCH 1/4] btrfs-progs: use usage() to replace the warning msg on no-arg usage

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

 



On Thu, Feb 13, 2014 at 11:16:35AM +0800, Gui Hecheng wrote:
> --- a/cmds-receive.c
> +++ b/cmds-receive.c
> @@ -951,10 +951,8 @@ int cmd_receive(int argc, char **argv)
>  		}
>  	}
>  
> -	if (optind + 1 != argc) {
> -		fprintf(stderr, "ERROR: receive needs path to subvolume\n");
> -		return 1;
> -	}
> +	if (optind + 1 != argc)

FYI, I've replaced this with check_argc_exact

> +		usage(cmd_receive_usage);
>  
>  	tomnt = argv[optind];
>  
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux