From 388610239fc3a322b7df358f7f57a8c120aca77f Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sat, 27 Dec 1997 03:00:59 +0000 Subject: [PATCH] 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. --- sys/amd64/amd64/sys_machdep.c | 4 +++- sys/i386/i386/sys_machdep.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index b9972e6ad264..435e45171445 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 b9972e6ad264..435e45171445 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;