]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/nfsumount.c
umount.nfs: eliminate a nearly empty header file.
[nfs-utils.git] / utils / mount / nfsumount.c
index fd4194faf6d196e1e572e53beeadf29a50dec718..86fb6a206ce46407f6c668e039305746463a51a6 100644 (file)
@@ -33,7 +33,6 @@
 
 #include "mount_constants.h"
 #include "mount.h"
-#include "nfsumount.h"
 #include "error.h"
 #include "network.h"
 
@@ -326,11 +325,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);