On clean reboots wipe the dmesg output. For all other reboots try to keep as much as possible (no change there). Index: sys/kern/kern_shutdown.c =================================================================== RCS file: sys/kern/kern_shutdown.c,v retrieving revision 1.1.1.4 retrieving revision 1.2 diff -u -r1.1.1.4 -r1.2 --- sys/kern/kern_shutdown.c 2002/08/28 08:58:58 1.1.1.4 +++ sys/kern/kern_shutdown.c 2004/03/02 13:51:36 1.2 @@ -61,6 +61,7 @@ #include <sys/conf.h> #include <sys/sysproto.h> #include <sys/cons.h> +#include <sys/msgbuf.h> #include <machine/pcb.h> #include <machine/clock.h> @@ -332,6 +333,10 @@ printf("\n"); printf("The operating system has halted.\n"); printf("Please press any key to reboot.\n\n"); + if (msgbufp != (struct msgbuf *) 0) { + /* fix dmesg buffer on soft reboot */ + msgbufp->msg_magic = 0; + } switch (cngetc()) { case -1: /* No console, just die */ cpu_halt(); @@ -385,6 +390,10 @@ { printf("Rebooting...\n"); DELAY(1000000); /* wait 1 sec for printf's to complete and be read */ + if (msgbufp != (struct msgbuf *) 0) { + /* fix dmesg buffer on soft reboot */ + msgbufp->msg_magic = 0; + } /* cpu_boot(howto); */ /* doesn't do anything at the moment */ cpu_reset(); /* NOTREACHED */ /* assuming reset worked */
Rene, I found your patch hocking in GNATS for quite some time. I'm sorry your patch hasn't committed yet. I'm wondering if you're able to bring your patch up to date against a recent RELENG_7 or CURRENT and send us the updated patch? Also I think that functionality should be enabled by a sysctl. Thanks for your work!
State Changed From-To: open->feedback Note that submitter has been asked for feedback.
State Changed From-To: feedback->suspended Mark suspended awaiting more recent patches.
For bugs matching the following conditions: - Status == In Progress - Assignee == "bugs@FreeBSD.org" - Last Modified Year <= 2017 Do - Set Status to "Open"
Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>