From: Chuck Lever Date: Sat, 28 Jul 2007 21:50:09 +0000 (-0400) Subject: umount.nfs: Pass return codes from do_nfs_umount back X-Git-Tag: nfs-utils-1-1-1~121 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=f677d6b430927f5141c89874c649a7650a831550;p=nfs-utils.git umount.nfs: Pass return codes from do_nfs_umount back Do we really care about these return codes? Signed-off-by: Chuck Lever Signed-off-by: Neil Brown --- diff --git a/utils/mount/nfsumount.c b/utils/mount/nfsumount.c index fd4194f..a15e524 100644 --- a/utils/mount/nfsumount.c +++ b/utils/mount/nfsumount.c @@ -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);