diff mbox

mount.nfs: added usage output when no arguemnts are given

Message ID 1465324504-8018-1-git-send-email-steved@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve Dickson June 7, 2016, 6:35 p.m. UTC
Signed-off-by: Steve Dickson <steved@redhat.com>
---
 utils/mount/mount_libmount.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Freeman Zhang June 8, 2016, 10:52 a.m. UTC | #1
On 06/08/2016 02:35 AM, Steve Dickson wrote:
> Signed-off-by: Steve Dickson <steved@redhat.com>
> ---
>   utils/mount/mount_libmount.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/utils/mount/mount_libmount.c b/utils/mount/mount_libmount.c
> index fa46d54..1f01f7f 100644
> --- a/utils/mount/mount_libmount.c
> +++ b/utils/mount/mount_libmount.c
> @@ -208,6 +208,7 @@ static int umount_main(struct libmnt_context *cxt, int argc, char **argv)
>   
>   	if (!spec || (*spec != '/' && strchr(spec,':') == NULL)) {
>   		nfs_error(_("%s: no mount point provided"), progname);
> +		umount_usage();
>   		return EX_USAGE;
>   	}
>   
> @@ -329,6 +330,7 @@ static int mount_main(struct libmnt_context *cxt, int argc, char **argv)
>   
>   	if (!mount_point) {
>   		nfs_error(_("%s: no mount point provided"), progname);
> +		mount_usage();
>   		goto err;
>   	}
>   	if (!spec) {
Reasonable. Ack.
Acked-by: Freeman Zhang <zhezhang@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Steve Dickson June 8, 2016, 1:12 p.m. UTC | #2
On 06/07/2016 02:35 PM, Steve Dickson wrote:
> Signed-off-by: Steve Dickson <steved@redhat.com>
> ---
>  utils/mount/mount_libmount.c | 2 ++
>  1 file changed, 2 insertions(+)
Committed... 

steved.

> 
> diff --git a/utils/mount/mount_libmount.c b/utils/mount/mount_libmount.c
> index fa46d54..1f01f7f 100644
> --- a/utils/mount/mount_libmount.c
> +++ b/utils/mount/mount_libmount.c
> @@ -208,6 +208,7 @@ static int umount_main(struct libmnt_context *cxt, int argc, char **argv)
>  
>  	if (!spec || (*spec != '/' && strchr(spec,':') == NULL)) {
>  		nfs_error(_("%s: no mount point provided"), progname);
> +		umount_usage();
>  		return EX_USAGE;
>  	}
>  
> @@ -329,6 +330,7 @@ static int mount_main(struct libmnt_context *cxt, int argc, char **argv)
>  
>  	if (!mount_point) {
>  		nfs_error(_("%s: no mount point provided"), progname);
> +		mount_usage();
>  		goto err;
>  	}
>  	if (!spec) {
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/utils/mount/mount_libmount.c b/utils/mount/mount_libmount.c
index fa46d54..1f01f7f 100644
--- a/utils/mount/mount_libmount.c
+++ b/utils/mount/mount_libmount.c
@@ -208,6 +208,7 @@  static int umount_main(struct libmnt_context *cxt, int argc, char **argv)
 
 	if (!spec || (*spec != '/' && strchr(spec,':') == NULL)) {
 		nfs_error(_("%s: no mount point provided"), progname);
+		umount_usage();
 		return EX_USAGE;
 	}
 
@@ -329,6 +330,7 @@  static int mount_main(struct libmnt_context *cxt, int argc, char **argv)
 
 	if (!mount_point) {
 		nfs_error(_("%s: no mount point provided"), progname);
+		mount_usage();
 		goto err;
 	}
 	if (!spec) {