summaryrefslogtreecommitdiff
path: root/mount/umount.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2006-12-07 00:25:54 +0100
committerKarel Zak <kzak@redhat.com>2006-12-07 00:25:54 +0100
commit1d4ad1decc539c9729b592e6050460d6487c95f4 (patch)
treec158c5f5baf15ea4bab5c05b2f6e2bdaca332c29 /mount/umount.c
parentffc4374869b9ac10539a3c18e13b29d1b0c64484 (diff)
downloadutil-linux-old-1d4ad1decc539c9729b592e6050460d6487c95f4.tar.gz
Imported from util-linux-2.11q tarball.
Diffstat (limited to 'mount/umount.c')
-rw-r--r--mount/umount.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mount/umount.c b/mount/umount.c
index 4688495e..0c1306a2 100644
--- a/mount/umount.c
+++ b/mount/umount.c
@@ -270,12 +270,11 @@ umount_one (const char *spec, const char *node, const char *type,
umnt_err = umnt_err2 = 0;
if (lazy) {
res = umount2 (node, MNT_DETACH);
- if (res < 0) {
- complain(errno, node);
- return 1;
- } else
- return 0;
+ if (res < 0)
+ umnt_err = errno;
+ goto writemtab;
}
+
if (force) { /* only supported for NFS */
res = umount2 (node, MNT_FORCE);
if (res == -1) {
@@ -373,6 +372,7 @@ umount_one (const char *spec, const char *node, const char *type,
if (loopdev)
del_loop(loopdev);
+ writemtab:
if (!nomtab && mtab_is_writable() &&
(umnt_err == 0 || umnt_err == EINVAL || umnt_err == ENOENT)) {
update_mtab (node, NULL);