Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/wsfb Add helper to detach genfb console.



details:   https://anonhg.NetBSD.org/src/rev/a6912d81e2a9
branches:  trunk
changeset: 364488:a6912d81e2a9
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Mon Mar 28 11:21:40 2022 +0000

description:
Add helper to detach genfb console.

diffstat:

 sys/dev/wsfb/genfb.c    |  15 +++++++++++++--
 sys/dev/wsfb/genfbvar.h |   3 ++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diffs (53 lines):

diff -r 3159d5b577a8 -r a6912d81e2a9 sys/dev/wsfb/genfb.c
--- a/sys/dev/wsfb/genfb.c      Mon Mar 28 11:16:59 2022 +0000
+++ b/sys/dev/wsfb/genfb.c      Mon Mar 28 11:21:40 2022 +0000
@@ -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_called = 1;
 }
 
+int
+genfb_cndetach(void)
+{
+
+       if (genfb_cnattach_called) {
+               genfb_cnattach_called = 0;
+               return 1;
+       }
+       return 0;
+}
+
 void
 genfb_disable(void)
 {
diff -r 3159d5b577a8 -r a6912d81e2a9 sys/dev/wsfb/genfbvar.h
--- a/sys/dev/wsfb/genfbvar.h   Mon Mar 28 11:16:59 2022 +0000
+++ b/sys/dev/wsfb/genfbvar.h   Mon Mar 28 11:21:40 2022 +0000
@@ -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 @@
 };
 
 void   genfb_cnattach(void);
+int    genfb_cndetach(void);
 void   genfb_disable(void);
 int    genfb_is_console(void);
 int    genfb_is_enabled(void);



Home | Main Index | Thread Index | Old Index