b4c3fd23b9
will not run on laptops from other manufactures. Tools are included to turn the fan on/off, etc. *** Right now I consider this pkg to be in beta state. Any feedback, *** patches preferred! :-)
34 lines
753 B
Text
34 lines
753 B
Text
$NetBSD: patch-ah,v 1.1.1.1 1999/12/20 03:05:16 hubertf Exp $
|
|
|
|
--- src/tdocked.c.orig Fri Dec 17 14:07:03 1999
|
|
+++ src/tdocked.c Mon Dec 20 03:35:38 1999
|
|
@@ -32,6 +32,11 @@
|
|
#ifdef __GLIBC__
|
|
#include<sys/perm.h>
|
|
#endif
|
|
+#ifdef __NetBSD__
|
|
+#include <sys/types.h>
|
|
+#include <machine/sysarch.h>
|
|
+#include <err.h>
|
|
+#endif
|
|
|
|
#include"hci.h"
|
|
#include"sci.h"
|
|
@@ -56,10 +61,17 @@
|
|
|
|
/* get the necessary I/O permissions */
|
|
|
|
+#ifdef __NetBSD__
|
|
+ if (i386_iopl(3) == -1) {
|
|
+ warn("i386_iopl");
|
|
+ return 1;
|
|
+ }
|
|
+#else
|
|
if (ioperm(0xb2, 1, 1)) {
|
|
fprintf(stderr, "tdocked: can't get I/O permissions.\n");
|
|
return 0xff;
|
|
}
|
|
+#endif
|
|
|
|
/* drop root priveleges to reduce security risk of running suid root */
|
|
|