diff options
| author | Karel Zak <kzak@redhat.com> | 2006-12-07 00:26:19 +0100 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2006-12-07 00:26:19 +0100 |
| commit | d26aa358f42df65da50014ad62b1a78f22c97400 (patch) | |
| tree | bf961bf31e4f704fc997acde938d292c4abdc588 /login-utils | |
| parent | 2cccd0ff2b26c782dbd05d589b7695cab5e17458 (diff) | |
| download | util-linux-old-d26aa358f42df65da50014ad62b1a78f22c97400.tar.gz | |
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 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); |
