summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2002-09-05 09:31:20 +0000
committermiod <miod@openbsd.org>2002-09-05 09:31:20 +0000
commitea73e71c2d553af279c81cc2034c8fcee4a15f2f (patch)
tree8bbe122c5988712dcbfdb51395160dc09afcdc9a
parentthis used to be a com(4) bug (diff)
downloadwireguard-openbsd-ea73e71c2d553af279c81cc2034c8fcee4a15f2f.tar.xz
wireguard-openbsd-ea73e71c2d553af279c81cc2034c8fcee4a15f2f.zip
Allow kernels with no display device configured to link. Found by marc@
-rw-r--r--sys/arch/sparc/dev/fb.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/sys/arch/sparc/dev/fb.c b/sys/arch/sparc/dev/fb.c
index a358eef0834..ccc6da4839a 100644
--- a/sys/arch/sparc/dev/fb.c
+++ b/sys/arch/sparc/dev/fb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fb.c,v 1.20 2002/08/16 02:06:43 millert Exp $ */
+/* $OpenBSD: fb.c,v 1.21 2002/09/05 09:31:20 miod Exp $ */
/* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */
/*
@@ -92,6 +92,25 @@
#include <dev/rasops/rasops.h>
#include <machine/fbvar.h>
+#include "wsdisplay.h"
+
+/*
+ * emergency unblank code
+ * XXX should be somewhat moved to wscons MI code
+ */
+
+void (*fb_burner)(void *, u_int, u_int);
+void *fb_cookie;
+
+void
+fb_unblank()
+{
+ if (fb_burner != NULL)
+ (*fb_burner)(fb_cookie, 1, 0);
+}
+
+#if NWSDISPLAY > 0
+
void
fb_setsize(sf, def_depth, def_width, def_height, node, bustype)
struct sunfb *sf;
@@ -286,21 +305,6 @@ a2int(cp, deflt)
return (i);
}
-/*
- * emergency unblank code
- * XXX should be somewhat moved to wscons MI code
- */
-
-void (*fb_burner)(void *, u_int, u_int);
-void *fb_cookie;
-
-void
-fb_unblank()
-{
- if (fb_burner != NULL)
- (*fb_burner)(fb_cookie, 1, 0);
-}
-
void
fbwscons_init(sf, isconsole)
struct sunfb *sf;
@@ -481,3 +485,4 @@ fb_pfour_set_video(sf, enable)
#endif /* SUN4 */
+#endif /* NWSDISPLAY */