summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>1998-07-28 03:29:32 +0000
committerjlemon <jlemon@FreeBSD.org>1998-07-28 03:29:32 +0000
commit93c5ad9d9e9c1bb561c834fe325028e7687f6cec (patch)
treecd595b5142bb6aa445015b7c0005a25b0a628acb /sys/amd64
parentd66e06a69f2615002fb6b191dd1914e1d6c5955b (diff)
downloadFreeBSD-src-93c5ad9d9e9c1bb561c834fe325028e7687f6cec.zip
FreeBSD-src-93c5ad9d9e9c1bb561c834fe325028e7687f6cec.tar.gz
Fix an off-by-one error when setting the iomap bits.
Change struct i386_*_iomap to use ints instead of shorts/chars. (pointed out by bde long ago, prodded into action by msmith)
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/sys_machdep.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c
index af0ec8e..bd3dab7 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.33 1998/02/13 05:25:37 bde Exp $
+ * $Id: sys_machdep.c,v 1.34 1998/03/23 19:52:34 jlemon Exp $
*
*/
@@ -169,9 +169,9 @@ i386_extend_pcb(struct proc *p)
}
struct i386_ioperm_args {
- u_short start;
- u_short length;
- u_char enable;
+ u_int start;
+ u_int length;
+ int enable;
};
static int
@@ -205,7 +205,7 @@ i386_set_ioperm(p, args)
if (ua.start + ua.length > IOPAGES * PAGE_SIZE * NBBY)
return (EINVAL);
- for (i = ua.start; i < (int)(ua.start + ua.length) + 1; i++) {
+ for (i = ua.start; i < ua.start + ua.length; i++) {
if (ua.enable)
iomap[i >> 3] &= ~(1 << (i & 7));
else
OpenPOWER on IntegriCloud