Skip to contentSkip to conversation

umount.nfs: Pass return codes from do_nfs_umount back

PATCH In review Chuck Lever 1 participant 1 message Jul 28, 2007

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

PATCH 12/23 umount.nfs: Pass return codes from do_nfs_umount back

Do we really care about these return codes?

---

 utils/mount/nfsumount.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
utils/mount/nfsumount.c +4 -3
index 4a41ff1..8e4207f 100644
@@ -326,11 +326,12 @@ int nfsumount(int argc, char *argv[])
 	ret = 0;
 	if (mc) {
 		if (!lazy)
-			do_nfs_umount(mc->m.mnt_fsname, mc->m.mnt_opts);
-		ret = del_mtab(mc->m.mnt_fsname, mc->m.mnt_dir);
+			ret = do_nfs_umount(mc->m.mnt_fsname, mc->m.mnt_opts);
+		if (!ret || force)
+			ret = del_mtab(mc->m.mnt_fsname, mc->m.mnt_dir);
 	} else if (*spec != '/') {
 		if (!lazy)
-			do_nfs_umount(spec, "tcp,v3");
+			ret = do_nfs_umount(spec, "tcp,v3");
 	} else
 		ret = del_mtab(NULL, spec);
 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs