View | Details | Raw Unified | Return to bug 200784 | Differences between
and this patch

Collapse All | Expand All

(-)kern_shutdown.c (+4 lines)
Lines 136-141 Link Here
136
SYSCTL_INT(_kern_shutdown, OID_AUTO, show_busybufs, CTLFLAG_RW,
136
SYSCTL_INT(_kern_shutdown, OID_AUTO, show_busybufs, CTLFLAG_RW,
137
	&show_busybufs, 0, "");
137
	&show_busybufs, 0, "");
138
138
139
int show_umountfs;
140
SYSCTL_INT(_kern_shutdown, OID_AUTO, show_umountfs, CTLFLAG_RW,
141
	&show_umountfs, 0, "Print the unmounted filesystems at shutdown");
142
139
/*
143
/*
140
 * Variable panicstr contains argument to first call to panic; used as flag
144
 * Variable panicstr contains argument to first call to panic; used as flag
141
 * to indicate that the kernel has already called panic.
145
 * to indicate that the kernel has already called panic.
(-)vfs_subr.c (+10 lines)
Lines 3483-3488 Link Here
3483
    "");
3483
    "");
3484
#endif
3484
#endif
3485
3485
3486
extern int show_umountfs;
3487
3486
/*
3488
/*
3487
 * Unmount all filesystems. The list is traversed in reverse order
3489
 * Unmount all filesystems. The list is traversed in reverse order
3488
 * of mounting to avoid dependencies.
3490
 * of mounting to avoid dependencies.
Lines 3503-3509 Link Here
3503
	while(!TAILQ_EMPTY(&mountlist)) {
3505
	while(!TAILQ_EMPTY(&mountlist)) {
3504
		mp = TAILQ_LAST(&mountlist, mntlist);
3506
		mp = TAILQ_LAST(&mountlist, mntlist);
3505
		vfs_ref(mp);
3507
		vfs_ref(mp);
3508
		if (show_umountfs)
3509
			printf("Unmounting %s (%s)...", mp->mnt_stat.f_mntonname,
3510
				mp->mnt_vfc->vfc_name);
3506
		error = dounmount(mp, MNT_FORCE, td);
3511
		error = dounmount(mp, MNT_FORCE, td);
3512
		if (show_umountfs) {
3513
			if (error == 0)
3514
				printf("done");
3515
			printf("\n");
3516
			}
3507
		if (error != 0) {
3517
		if (error != 0) {
3508
			TAILQ_REMOVE(&mountlist, mp, mnt_list);
3518
			TAILQ_REMOVE(&mountlist, mp, mnt_list);
3509
			/*
3519
			/*

Return to bug 200784