mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 12:48:33 -10:00
During shutdown, announce each file system as it's unmounted.
But only if debug.bootverbose=1. MFC after: 2 weeks Sponsored by: ConnectWise
This commit is contained in:
1 parent
9aff62dee2
commit
b551cb063c
1 file changed
+18
-1
+18
-1
@@ -5127,9 +5127,17 @@ void
|
||||
vfs_unmountall(void)
|
||||
{
|
||||
struct mount *mp, *tmp;
|
||||
int nmountpoints = 0;
|
||||
int n = 0;
|
||||
|
||||
CTR1(KTR_VFS, "%s: unmounting all filesystems", __func__);
|
||||
|
||||
if (bootverbose) {
|
||||
TAILQ_FOREACH(mp, &mountlist, mnt_list) {
|
||||
nmountpoints++;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Since this only runs when rebooting, it is not interlocked.
|
||||
*/
|
||||
@@ -5143,11 +5151,20 @@ vfs_unmountall(void)
|
||||
if (mp == rootdevmp)
|
||||
continue;
|
||||
|
||||
if (bootverbose) {
|
||||
printf("\tUnmounting %d/%d %s\n", ++n, nmountpoints,
|
||||
mp->mnt_stat.f_mntonname);
|
||||
}
|
||||
unmount_or_warn(mp);
|
||||
}
|
||||
|
||||
if (rootdevmp != NULL)
|
||||
if (rootdevmp != NULL) {
|
||||
if (bootverbose) {
|
||||
printf("\tUnmounting %d/%d %s\n", ++n, nmountpoints,
|
||||
rootdevmp->mnt_stat.f_mntonname);
|
||||
}
|
||||
unmount_or_warn(rootdevmp);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in new issue
Block a user