Index: kern_shutdown.c =================================================================== --- kern_shutdown.c (revision 284158) +++ kern_shutdown.c (working copy) @@ -136,6 +136,10 @@ SYSCTL_INT(_kern_shutdown, OID_AUTO, show_busybufs, CTLFLAG_RW, &show_busybufs, 0, ""); +int show_umountfs; +SYSCTL_INT(_kern_shutdown, OID_AUTO, show_umountfs, CTLFLAG_RW, + &show_umountfs, 0, "Print the unmounted filesystems at shutdown"); + /* * Variable panicstr contains argument to first call to panic; used as flag * to indicate that the kernel has already called panic. Index: vfs_subr.c =================================================================== --- vfs_subr.c (revision 284158) +++ vfs_subr.c (working copy) @@ -3483,6 +3483,8 @@ ""); #endif +extern int show_umountfs; + /* * Unmount all filesystems. The list is traversed in reverse order * of mounting to avoid dependencies. @@ -3503,7 +3505,15 @@ while(!TAILQ_EMPTY(&mountlist)) { mp = TAILQ_LAST(&mountlist, mntlist); vfs_ref(mp); + if (show_umountfs) + printf("Unmounting %s (%s)...", mp->mnt_stat.f_mntonname, + mp->mnt_vfc->vfc_name); error = dounmount(mp, MNT_FORCE, td); + if (show_umountfs) { + if (error == 0) + printf("done"); + printf("\n"); + } if (error != 0) { TAILQ_REMOVE(&mountlist, mp, mnt_list); /*