Bugs #1807 & #1808: make wsfb driver work on NetBSD (Nathan J. Williams).

This commit is contained in:
Matthieu Herrb
2004-11-09 21:01:05 +00:00
parent e7c66868a9
commit 60ee2b97e6

View File

@@ -36,6 +36,7 @@
* Michel Dänzer, <michdaen@iiic.ethz.ch>
*/
#include <fcntl.h>
#include <sys/types.h>
#include <sys/time.h>
#include <dev/wscons/wsconsio.h>
@@ -200,9 +201,10 @@ WsfbSetup(pointer module, pointer opts, int *errmaj, int *errmin)
static Bool setupDone = FALSE;
const char *osname;
/* Check that we're being loaded on a OpenBSD system */
/* Check that we're being loaded on a OpenBSD or NetBSD system */
LoaderGetOS(&osname, NULL, NULL, NULL);
if (!osname || strcmp(osname, "openbsd") != 0) {
if (!osname || (strcmp(osname, "openbsd") != 0 &&
strcmp(osname, "netbsd") != 0)) {
if (errmaj)
*errmaj = LDR_BADOS;
if (errmin)