add wsdisplay_switchtoconsole() to allow other parts of kernel to force
the wscons to switch to console; code taken from wsdisplay_shutdownhook(), which is now just a wrapper around wsdisplay_switchtoconsole()
This commit is contained in:
parent
d0790aa895
commit
d22624c1d2
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wsdisplay.c,v 1.29 1999/10/01 22:29:12 ad Exp $ */
|
||||
/* $NetBSD: wsdisplay.c,v 1.30 1999/10/12 16:47:41 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
|
||||
@ -33,7 +33,7 @@
|
||||
static const char _copyright[] __attribute__ ((unused)) =
|
||||
"Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.";
|
||||
static const char _rcsid[] __attribute__ ((unused)) =
|
||||
"$NetBSD: wsdisplay.c,v 1.29 1999/10/01 22:29:12 ad Exp $";
|
||||
"$NetBSD: wsdisplay.c,v 1.30 1999/10/12 16:47:41 jdolecek Exp $";
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
@ -1707,14 +1707,22 @@ wsdisplay_set_cons_kbd(get, poll)
|
||||
}
|
||||
|
||||
/*
|
||||
* Switch the console display to it's first screen at shutdown.
|
||||
* Switch the console display to it's first screen.
|
||||
*/
|
||||
void
|
||||
wsdisplay_switchtoconsole()
|
||||
{
|
||||
if (wsdisplay_console_device != NULL)
|
||||
wsdisplay_switch((struct device *)wsdisplay_console_device,
|
||||
0, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Switch the console at shutdown.
|
||||
*/
|
||||
static void
|
||||
wsdisplay_shutdownhook(arg)
|
||||
void *arg;
|
||||
{
|
||||
|
||||
if (wsdisplay_console_device != NULL)
|
||||
wsdisplay_switch((struct device *)wsdisplay_console_device,
|
||||
0, 0);
|
||||
wsdisplay_switchtoconsole();
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wsdisplayvar.h,v 1.11 1999/02/12 11:25:23 drochner Exp $ */
|
||||
/* $NetBSD: wsdisplayvar.h,v 1.12 1999/10/12 16:47:41 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
|
||||
@ -189,3 +189,8 @@ int wsdisplay_usl_ioctl __P((struct wsdisplay_softc *, struct wsscreen *,
|
||||
int wsdisplay_cfg_ioctl __P((struct wsdisplay_softc *sc,
|
||||
u_long cmd, caddr_t data,
|
||||
int flag, struct proc *p));
|
||||
|
||||
/*
|
||||
* for general use
|
||||
*/
|
||||
void wsdisplay_switchtoconsole __P((void));
|
||||
|
Loading…
Reference in New Issue
Block a user