diff options
author | dg <dg@FreeBSD.org> | 1994-08-22 17:05:00 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-08-22 17:05:00 +0000 |
commit | b2d6b5fa246c4ffdc1576ce61b0f52773b7d1357 (patch) | |
tree | a533c80b67852e6fde603c0d658b69291c5f1b7c /sys | |
parent | fd6631bb73ace75acad7eb4e3cc5b82379970c00 (diff) | |
download | FreeBSD-src-b2d6b5fa246c4ffdc1576ce61b0f52773b7d1357.zip FreeBSD-src-b2d6b5fa246c4ffdc1576ce61b0f52773b7d1357.tar.gz |
print "BUSY" instead of error number if filesystem was busy during
vfs_unmountall() - this is the most common case. If it was a different
error, then print the error number.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_export.c | 18 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 18 |
2 files changed, 26 insertions, 10 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index e26b030..d33edfd 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94 - * $Id: vfs_subr.c,v 1.4 1994/08/18 22:35:09 wollman Exp $ + * $Id: vfs_subr.c,v 1.5 1994/08/20 16:03:12 davidg Exp $ */ /* @@ -193,8 +193,13 @@ vfs_unmountroot(rootfs) if (error = VFS_SYNC(mp, MNT_WAIT, initproc->p_ucred, initproc)) printf("sync of root filesystem failed (%d)\n", error); - if (error = VFS_UNMOUNT(mp, MNT_FORCE, initproc)) - printf("unmount of root filesystem failed (%d)\n", error); + if (error = VFS_UNMOUNT(mp, MNT_FORCE, initproc)) { + printf("unmount of root filesystem failed ("); + if (error == EBUSY) + printf("BUSY)\n"); + else + printf("%d)\n", error); + } mp->mnt_flag &= ~MNT_UNMOUNT; vfs_unbusy(mp); @@ -220,8 +225,11 @@ vfs_unmountall() error = dounmount(mp, MNT_FORCE, initproc); if (error) { - printf("unmount of %s failed (%d)\n", - mp->mnt_stat.f_mntonname, error); + printf("unmount of %s failed (", mp->mnt_stat.f_mntonname); + if (error == EBUSY) + printf("BUSY)\n"); + else + printf("%d)\n", error); } } diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index e26b030..d33edfd 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94 - * $Id: vfs_subr.c,v 1.4 1994/08/18 22:35:09 wollman Exp $ + * $Id: vfs_subr.c,v 1.5 1994/08/20 16:03:12 davidg Exp $ */ /* @@ -193,8 +193,13 @@ vfs_unmountroot(rootfs) if (error = VFS_SYNC(mp, MNT_WAIT, initproc->p_ucred, initproc)) printf("sync of root filesystem failed (%d)\n", error); - if (error = VFS_UNMOUNT(mp, MNT_FORCE, initproc)) - printf("unmount of root filesystem failed (%d)\n", error); + if (error = VFS_UNMOUNT(mp, MNT_FORCE, initproc)) { + printf("unmount of root filesystem failed ("); + if (error == EBUSY) + printf("BUSY)\n"); + else + printf("%d)\n", error); + } mp->mnt_flag &= ~MNT_UNMOUNT; vfs_unbusy(mp); @@ -220,8 +225,11 @@ vfs_unmountall() error = dounmount(mp, MNT_FORCE, initproc); if (error) { - printf("unmount of %s failed (%d)\n", - mp->mnt_stat.f_mntonname, error); + printf("unmount of %s failed (", mp->mnt_stat.f_mntonname); + if (error == EBUSY) + printf("BUSY)\n"); + else + printf("%d)\n", error); } } |