Call cnpollc(9) before cngetc(9) as the cons(9) man page says.
Currently most ports do nothing in cnpollc(9), but this is required to handle wskbd(9) .set_leds op in cngetc(9) properly, at least on luna68k.
This commit is contained in:
parent
0ad85c20a5
commit
5cf9c74cef
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.184 2021/01/03 17:42:10 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.185 2021/10/09 20:00:41 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.184 2021/01/03 17:42:10 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.185 2021/10/09 20:00:41 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -440,7 +440,10 @@ dumpsys(void)
|
|||
|
||||
#if defined(DDB) || defined(PANICWAIT)
|
||||
printf("Do you want to dump memory? [y]");
|
||||
cnputc(i = cngetc());
|
||||
cnpollc(1);
|
||||
i = cngetc();
|
||||
cnpollc(0);
|
||||
cnputc(i);
|
||||
switch (i) {
|
||||
case 'n':
|
||||
case 'N':
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.71 2020/06/11 19:20:43 ad Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.72 2021/10/09 20:00:41 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.71 2020/06/11 19:20:43 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.72 2021/10/09 20:00:41 tsutsui Exp $");
|
||||
|
||||
#include "opt_bufcache.h"
|
||||
#include "opt_ddb.h"
|
||||
|
@ -337,7 +337,9 @@ cpu_reboot(int howto, char *bootstr)
|
|||
#if defined(PANICWAIT) && !defined(DDB)
|
||||
if ((howto & RB_HALT) == 0 && panicstr) {
|
||||
printf("hit any key to reboot...\n");
|
||||
cnpollc(1);
|
||||
(void)cngetc();
|
||||
cnpollc(0);
|
||||
printf("\n");
|
||||
}
|
||||
#endif
|
||||
|
@ -345,7 +347,9 @@ cpu_reboot(int howto, char *bootstr)
|
|||
/* Finally, halt/reboot the system. */
|
||||
if (howto & RB_HALT) {
|
||||
printf("System halted. Hit any key to reboot.\n\n");
|
||||
cnpollc(1);
|
||||
(void)cngetc();
|
||||
cnpollc(0);
|
||||
}
|
||||
|
||||
printf("rebooting...\n");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.235 2021/08/06 05:22:21 tsutsui Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.236 2021/10/09 20:00:41 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.235 2021/08/06 05:22:21 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.236 2021/10/09 20:00:41 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -612,7 +612,9 @@ cpu_reboot(int howto, char *bootstr)
|
|||
#if defined(PANICWAIT) && !defined(DDB)
|
||||
if ((howto & RB_HALT) == 0 && panicstr) {
|
||||
printf("hit any key to reboot...\n");
|
||||
cnpollc(1);
|
||||
(void)cngetc();
|
||||
cnpollc(0);
|
||||
printf("\n");
|
||||
}
|
||||
#endif
|
||||
|
@ -620,7 +622,9 @@ cpu_reboot(int howto, char *bootstr)
|
|||
/* Finally, halt/reboot the system. */
|
||||
if (howto & RB_HALT) {
|
||||
printf("System halted. Hit any key to reboot.\n\n");
|
||||
cnpollc(1);
|
||||
(void)cngetc();
|
||||
cnpollc(0);
|
||||
}
|
||||
|
||||
printf("rebooting...\n");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.107 2021/09/25 15:18:38 tsutsui Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.108 2021/10/09 20:00:41 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.107 2021/09/25 15:18:38 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.108 2021/10/09 20:00:41 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
|
@ -472,7 +472,9 @@ haltsys:
|
|||
}
|
||||
if (howto & RB_HALT) {
|
||||
printf("System halted. Hit any key to reboot.\n\n");
|
||||
cnpollc(1);
|
||||
(void)cngetc();
|
||||
cnpollc(0);
|
||||
}
|
||||
|
||||
printf("rebooting...\n");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.362 2021/04/28 02:28:05 rin Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.363 2021/10/09 20:00:41 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -74,7 +74,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.362 2021/04/28 02:28:05 rin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.363 2021/10/09 20:00:41 tsutsui Exp $");
|
||||
|
||||
#include "opt_adb.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -500,7 +500,9 @@ cpu_reboot(int howto, char *bootstr)
|
|||
printf("\n");
|
||||
printf("The operating system has halted.\n");
|
||||
printf("Please press any key to reboot.\n\n");
|
||||
cnpollc(1);
|
||||
(void)cngetc();
|
||||
cnpollc(0);
|
||||
}
|
||||
|
||||
/* Map the last physical page VA = PA for doboot() */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.158 2020/06/11 19:20:44 ad Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.159 2021/10/09 20:00:41 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.158 2020/06/11 19:20:44 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.159 2021/10/09 20:00:41 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_m060sp.h"
|
||||
|
@ -654,7 +654,9 @@ cpu_reboot(int howto, char *bootstr)
|
|||
#if defined(PANICWAIT) && !defined(DDB)
|
||||
if ((howto & RB_HALT) == 0 && panicstr) {
|
||||
printf("hit any key to reboot...\n");
|
||||
cnpollc(1);
|
||||
(void)cngetc();
|
||||
cnpollc(0);
|
||||
printf("\n");
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.109 2021/08/06 05:53:50 tsutsui Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.110 2021/10/09 20:00:42 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.109 2021/08/06 05:53:50 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.110 2021/10/09 20:00:42 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -321,7 +321,9 @@ cpu_reboot(int howto, char *bootstr)
|
|||
#if defined(PANICWAIT) && !defined(DDB)
|
||||
if ((howto & RB_HALT) == 0 && panicstr) {
|
||||
printf("hit any key to reboot...\n");
|
||||
cnpollc(1);
|
||||
(void)cngetc();
|
||||
cnpollc(0);
|
||||
printf("\n");
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.115 2020/06/11 19:20:44 ad Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.116 2021/10/09 20:00:42 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Darrin B. Jewell
|
||||
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.115 2020/06/11 19:20:44 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.116 2021/10/09 20:00:42 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
|
@ -469,7 +469,9 @@ cpu_reboot(int howto, char *bootstr)
|
|||
#if defined(PANICWAIT) && !defined(DDB)
|
||||
if ((howto & RB_HALT) == 0 && panicstr) {
|
||||
printf("hit any key to reboot...\n");
|
||||
cnpollc(1);
|
||||
(void)cngetc();
|
||||
cnpollc(0);
|
||||
printf("\n");
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.206 2021/08/06 04:21:56 isaki Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.207 2021/10/09 20:00:42 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.206 2021/08/06 04:21:56 isaki Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.207 2021/10/09 20:00:42 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
|
@ -518,7 +518,9 @@ cpu_reboot(int howto, char *bootstr)
|
|||
#if defined(PANICWAIT) && !defined(DDB)
|
||||
if ((howto & RB_HALT) == 0 && panicstr) {
|
||||
printf("hit any key to reboot...\n");
|
||||
cnpollc(1);
|
||||
(void)cngetc();
|
||||
cnpollc(0);
|
||||
printf("\n");
|
||||
}
|
||||
#endif
|
||||
|
@ -551,7 +553,9 @@ cpu_reboot(int howto, char *bootstr)
|
|||
/* PASSTHROUGH even if came back */
|
||||
} else if ((howto & RB_HALT) == RB_HALT) {
|
||||
printf("System halted. Hit any key to reboot.\n\n");
|
||||
cnpollc(1);
|
||||
(void)cngetc();
|
||||
cnpollc(0);
|
||||
}
|
||||
|
||||
printf("rebooting...\n");
|
||||
|
|
Loading…
Reference in New Issue