summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2009-09-24 07:34:41 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2009-09-24 07:34:41 +0000
commite63c3af776f157942bd987c3bfc87df3ccea5c96 (patch)
tree7515242b8f6584febd3149e48e7c21ed6aa4f5e8 /driver
parent202fac178d75ccd37748ca6d1f336866bd7c576a (diff)
wsudl(4) / udl(4) works on NetBSD as well now.
From FUKAUMI Naoki
Diffstat (limited to 'driver')
-rw-r--r--driver/xf86-video-wsudl/src/wsudl_driver.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/driver/xf86-video-wsudl/src/wsudl_driver.c b/driver/xf86-video-wsudl/src/wsudl_driver.c
index f2f2d91bf..5f889f90f 100644
--- a/driver/xf86-video-wsudl/src/wsudl_driver.c
+++ b/driver/xf86-video-wsudl/src/wsudl_driver.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsudl_driver.c,v 1.3 2009/09/23 20:09:03 mglocker Exp $ */
+/* $OpenBSD: wsudl_driver.c,v 1.4 2009/09/24 07:34:40 mglocker Exp $ */
/*
* Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org>
@@ -133,7 +133,11 @@ extern int priv_open_device(const char *);
/*
* Default device node for wsdisplay.
*/
+#if defined(__NetBSD__)
+#define WSUDL_DEFAULT_DEV "/dev/ttyE0"
+#else
#define WSUDL_DEFAULT_DEV "/dev/ttyC0"
+#endif
/*
* X driver glue.
@@ -226,9 +230,10 @@ WsudlSetup(pointer module, pointer opts, int *errmaj, int *errmin)
DEBUGP("WsudlSetup");
- /* we need to run on OpenBSD */
+ /* Check that we're being loaded on a OpenBSD or NetBSD system. */
LoaderGetOS(&osname, NULL, NULL, NULL);
- if (osname == NULL || strcmp(osname, "openbsd") != 0) {
+ if (osname == NULL || (strcmp(osname, "openbsd") != 0 &&
+ strcmp(osname, "netbsd") != 0)) {
if (errmaj)
*errmaj = LDR_BADOS;
if (errmin)