]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
umount.nfs: Pass return codes from do_nfs_umount back
authorChuck Lever <chuck.lever@oracle.com>
Sat, 28 Jul 2007 21:50:09 +0000 (17:50 -0400)
committerNeil Brown <neilb@suse.de>
Mon, 30 Jul 2007 06:12:53 +0000 (16:12 +1000)
Do we really care about these return codes?

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
utils/mount/nfsumount.c

index fd4194faf6d196e1e572e53beeadf29a50dec718..a15e5245e52473bc10b529c2ff96157d95e6b523 100644 (file)
@@ -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);