mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-18 17:00:49 +01:00
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.
This commit is contained in:
parent
f0b544e99e
commit
4f5a3fef1a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2220
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user