Add helper to detach genfb console.
This commit is contained in:
parent
6a5f419e50
commit
24dda235e4
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: genfb.c,v 1.85 2021/12/24 18:12:58 jmcneill Exp $ */
|
||||
/* $NetBSD: genfb.c,v 1.86 2022/03/28 11:21:40 mlelstv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 Michael Lorenz
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.85 2021/12/24 18:12:58 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.86 2022/03/28 11:21:40 mlelstv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -835,6 +835,17 @@ genfb_cnattach(void)
|
|||
genfb_cnattach_called = 1;
|
||||
}
|
||||
|
||||
int
|
||||
genfb_cndetach(void)
|
||||
{
|
||||
|
||||
if (genfb_cnattach_called) {
|
||||
genfb_cnattach_called = 0;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
genfb_disable(void)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: genfbvar.h,v 1.26 2021/01/27 22:42:53 macallan Exp $ */
|
||||
/* $NetBSD: genfbvar.h,v 1.27 2022/03/28 11:21:40 mlelstv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 Michael Lorenz
|
||||
|
@ -167,6 +167,7 @@ struct genfb_softc {
|
|||
};
|
||||
|
||||
void genfb_cnattach(void);
|
||||
int genfb_cndetach(void);
|
||||
void genfb_disable(void);
|
||||
int genfb_is_console(void);
|
||||
int genfb_is_enabled(void);
|
||||
|
|
Loading…
Reference in New Issue