X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=utils%2Fmount%2Fnfsumount.c;h=0c667176f7ca325b84e99930c87517c19c13f649;hb=40b9d523a07cf5d146b3be2724c58e9e872a0836;hp=fd4194faf6d196e1e572e53beeadf29a50dec718;hpb=f5bab6c03c5205ef9d062f167cc30060f90fedc4;p=nfs-utils.git diff --git a/utils/mount/nfsumount.c b/utils/mount/nfsumount.c index fd4194f..0c66717 100644 --- a/utils/mount/nfsumount.c +++ b/utils/mount/nfsumount.c @@ -29,11 +29,9 @@ #include "xcommon.h" #include "fstab.h" #include "nls.h" -#include "conn.h" #include "mount_constants.h" #include "mount.h" -#include "nfsumount.h" #include "error.h" #include "network.h" @@ -326,11 +324,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);