Make cpu_reboot un-blank the screen (cnpollc(1)).

Validate space in page zero for the kcore header.
This commit is contained in:
gwr 1997-10-04 20:03:46 +00:00
parent 0ec1cda62f
commit 6b27a0d34f
2 changed files with 18 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.23 1997/10/02 01:15:11 gwr Exp $ */ /* $NetBSD: machdep.c,v 1.24 1997/10/04 20:03:46 gwr Exp $ */
/* /*
* Copyright (c) 1988 University of Utah. * Copyright (c) 1988 University of Utah.
@ -148,6 +148,7 @@ static void initcpu __P((void));
void void
consinit() consinit()
{ {
/* Note: cninit() done earlier. (See _startup.c) */
#ifdef KGDB #ifdef KGDB
/* XXX - Ask on console for kgdb_dev? */ /* XXX - Ask on console for kgdb_dev? */
@ -555,6 +556,9 @@ cpu_reboot(howto, user_boot_string)
if (cold) if (cold)
goto haltsys; goto haltsys;
/* Un-blank the screen if appropriate. */
cnpollc(1);
if ((howto & RB_NOSYNC) == 0) { if ((howto & RB_NOSYNC) == 0) {
reboot_sync(); reboot_sync();
/* /*
@ -647,6 +651,10 @@ cpu_dumpconf()
int maj; int maj;
int (*getsize)__P((dev_t)); int (*getsize)__P((dev_t));
/* Validate space in page zero for the kcore header. */
if (MSGBUFOFF < (sizeof(kcore_seg_t) + sizeof(cpu_kcore_hdr_t)))
panic("cpu_dumpconf: MSGBUFOFF too small");
if (dumpdev == NODEV) if (dumpdev == NODEV)
return; return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.23 1997/10/02 01:15:11 gwr Exp $ */ /* $NetBSD: machdep.c,v 1.24 1997/10/04 20:03:46 gwr Exp $ */
/* /*
* Copyright (c) 1988 University of Utah. * Copyright (c) 1988 University of Utah.
@ -148,6 +148,7 @@ static void initcpu __P((void));
void void
consinit() consinit()
{ {
/* Note: cninit() done earlier. (See _startup.c) */
#ifdef KGDB #ifdef KGDB
/* XXX - Ask on console for kgdb_dev? */ /* XXX - Ask on console for kgdb_dev? */
@ -555,6 +556,9 @@ cpu_reboot(howto, user_boot_string)
if (cold) if (cold)
goto haltsys; goto haltsys;
/* Un-blank the screen if appropriate. */
cnpollc(1);
if ((howto & RB_NOSYNC) == 0) { if ((howto & RB_NOSYNC) == 0) {
reboot_sync(); reboot_sync();
/* /*
@ -647,6 +651,10 @@ cpu_dumpconf()
int maj; int maj;
int (*getsize)__P((dev_t)); int (*getsize)__P((dev_t));
/* Validate space in page zero for the kcore header. */
if (MSGBUFOFF < (sizeof(kcore_seg_t) + sizeof(cpu_kcore_hdr_t)))
panic("cpu_dumpconf: MSGBUFOFF too small");
if (dumpdev == NODEV) if (dumpdev == NODEV)
return; return;