diff options
author | Karel Zak | 2006-12-07 00:26:19 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:26:19 +0100 |
commit | d26aa358f42df65da50014ad62b1a78f22c97400 (patch) | |
tree | bf961bf31e4f704fc997acde938d292c4abdc588 /login-utils | |
parent | Imported from util-linux-2.12d tarball. (diff) | |
download | kernel-qcow2-util-linux-d26aa358f42df65da50014ad62b1a78f22c97400.tar.gz kernel-qcow2-util-linux-d26aa358f42df65da50014ad62b1a78f22c97400.tar.xz kernel-qcow2-util-linux-d26aa358f42df65da50014ad62b1a78f22c97400.zip |
Imported from util-linux-2.12h tarball.
Diffstat (limited to 'login-utils')
-rw-r--r-- | login-utils/shutdown.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/login-utils/shutdown.c b/login-utils/shutdown.c index 46f29a704..d89f374c5 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); |