summaryrefslogtreecommitdiff
path: root/login-utils
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2006-12-07 00:26:19 +0100
committerKarel Zak <kzak@redhat.com>2006-12-07 00:26:19 +0100
commitd26aa358f42df65da50014ad62b1a78f22c97400 (patch)
treebf961bf31e4f704fc997acde938d292c4abdc588 /login-utils
parent2cccd0ff2b26c782dbd05d589b7695cab5e17458 (diff)
downloadutil-linux-old-d26aa358f42df65da50014ad62b1a78f22c97400.tar.gz
Imported from util-linux-2.12h tarball.
Diffstat (limited to 'login-utils')
-rw-r--r--login-utils/shutdown.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/login-utils/shutdown.c b/login-utils/shutdown.c
index 46f29a70..d89f374c 100644
--- a/login-utils/shutdown.c
+++ b/login-utils/shutdown.c
@@ -632,7 +632,18 @@ unmount_disks_ourselves(void)
}
n = 0;
while (n < 100 && (mnt = getmntent(mtab))) {
- if (strcmp (mnt->mnt_type, "devfs") == 0) continue;
+ /*
+ * Neil Phillips: trying to unmount temporary / kernel
+ * filesystems is pointless and may cause error messages;
+ * /dev can be a ramfs managed by udev.
+ */
+ if (strcmp(mnt->mnt_type, "devfs") == 0 ||
+ strcmp(mnt->mnt_type, "proc") == 0 ||
+ strcmp(mnt->mnt_type, "sysfs") == 0 ||
+ strcmp(mnt->mnt_type, "ramfs") == 0 ||
+ strcmp(mnt->mnt_type, "tmpfs") == 0 ||
+ strcmp(mnt->mnt_type, "devpts") == 0)
+ continue;
mntlist[n++] = strdup(mnt->mnt_dir);
}
endmntent(mtab);