Skip to contentSkip to conversation

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

PATCH In review Steve Dickson 2 participants 3 messages Jun 7, 2016 – Jun 8, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

---
 utils/mount/mount_libmount.c | 2 ++
 1 file changed, 2 insertions(+)
utils/mount/mount_libmount.c +2 -0
index fa46d54..1f01f7f 100644
@@ -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) {
Signature · 1 line
2.5.5
Acked-by on v1 1/1
#1 lore raw
Quoted 18 lines · Steve Dickson
---
  utils/mount/mount_libmount.c | 2 ++
  1 file changed, 2 insertions(+)
utils/mount/mount_libmount.c +1 -0
index fa46d54..1f01f7f 100644
@@ -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;
  	}
 

utils/mount/mount_libmount.c static int mount_main(struct libmnt_context *cxt, int argc, char **argv) · line 336

Quoted 7 lines
utils/mount/mount_libmount.c +1 -0
@@ -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.

#2 lore raw
In reply to Steve Dickson
Quoted 4 lines · Steve Dickson
---
 utils/mount/mount_libmount.c | 2 ++
 1 file changed, 2 insertions(+)

Committed...

steved.

Quoted 22 lines
utils/mount/mount_libmount.c +2 -0
index fa46d54..1f01f7f 100644
@@ -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) {