diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2005-08-20 17:12:47 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2005-08-20 17:12:47 +0000 |
| commit | 6cd8dee3c599fbde4cdb7f7944912fbc3e62c75f (patch) | |
| tree | 6d4fe73541f1bd5b4e8076f47aecfa2d1158099e /sys/kern/vfs_subr.c | |
| parent | b866c830d94f40b6e233eb6809ec2f8f43279922 (diff) | |
Notes
Diffstat (limited to 'sys/kern/vfs_subr.c')
| -rw-r--r-- | sys/kern/vfs_subr.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 603e6a4b5940..c686f95d446f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2722,12 +2722,22 @@ vfs_unmountall() error = dounmount(mp, MNT_FORCE, td); if (error) { TAILQ_REMOVE(&mountlist, mp, mnt_list); - printf("unmount of %s failed (", - mp->mnt_stat.f_mntonname); - if (error == EBUSY) - printf("BUSY)\n"); - else - printf("%d)\n", error); + /* + * XXX: Due to the way in which we mount the root + * file system off of devfs, devfs will generate a + * "busy" warning when we try to unmount it before + * the root. Don't print a warning as a result in + * order to avoid false positive errors that may + * cause needless upset. + */ + if (strcmp(mp->mnt_vfc->vfc_name, "devfs") != 0) { + printf("unmount of %s failed (", + mp->mnt_stat.f_mntonname); + if (error == EBUSY) + printf("BUSY)\n"); + else + printf("%d)\n", error); + } } else { /* The unmount has removed mp from the mountlist */ } |
