summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-12-27 03:00:59 +0000
committerpeter <peter@FreeBSD.org>1997-12-27 03:00:59 +0000
commitc97344001f693a486eb9636bb236dfe47da0511f (patch)
treee9bdfafbdd6f43539e9b14b844340e2419768b92
parent3c1b6940fcd9544b3be1d4de5fc1222fccb10ad6 (diff)
downloadFreeBSD-src-c97344001f693a486eb9636bb236dfe47da0511f.zip
FreeBSD-src-c97344001f693a486eb9636bb236dfe47da0511f.tar.gz
Back out previous commit, the so-called "unused code" was most definately
used, and caused a reference to an uninitialised variable (state). I think I've fixed it now, but since nothing in the tree seems to use it, I'm not sure.
-rw-r--r--sys/amd64/amd64/sys_machdep.c4
-rw-r--r--sys/i386/i386/sys_machdep.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c
index b9972e6..435e451 100644
--- a/sys/amd64/amd64/sys_machdep.c
+++ b/sys/amd64/amd64/sys_machdep.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91
- * $Id: sys_machdep.c,v 1.29 1997/11/20 18:43:45 bde Exp $
+ * $Id: sys_machdep.c,v 1.30 1997/11/26 22:45:47 joerg Exp $
*
*/
@@ -233,6 +233,8 @@ i386_get_ioperm(p, args)
iomap = (char *)p->p_addr->u_pcb.pcb_ext->ext_iomap;
+ i = ua.start;
+ state = (iomap[i >> 3] >> (i & 7)) & 1;
ua.enable = !state;
ua.length = 1;
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c
index b9972e6..435e451 100644
--- a/sys/i386/i386/sys_machdep.c
+++ b/sys/i386/i386/sys_machdep.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91
- * $Id: sys_machdep.c,v 1.29 1997/11/20 18:43:45 bde Exp $
+ * $Id: sys_machdep.c,v 1.30 1997/11/26 22:45:47 joerg Exp $
*
*/
@@ -233,6 +233,8 @@ i386_get_ioperm(p, args)
iomap = (char *)p->p_addr->u_pcb.pcb_ext->ext_iomap;
+ i = ua.start;
+ state = (iomap[i >> 3] >> (i & 7)) & 1;
ua.enable = !state;
ua.length = 1;
OpenPOWER on IntegriCloud