summaryrefslogtreecommitdiff
path: root/sys/arch/i386/stand/libsa
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2003-11-27 00:33:25 +0000
committerMarc Espie <espie@cvs.openbsd.org>2003-11-27 00:33:25 +0000
commit005b0c08c0568c7e16d5fcacb0768cbbd2daa8b1 (patch)
treec2c8649eb671729a8cc788220b9dc581dd90abd6 /sys/arch/i386/stand/libsa
parent9fab769a6c22b7fa6a93048134f8dfb31ef0ceab (diff)
gcc3 wants "m" operands to be lvalues.
okay toby, mickey.
Diffstat (limited to 'sys/arch/i386/stand/libsa')
-rw-r--r--sys/arch/i386/stand/libsa/biosdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/i386/stand/libsa/biosdev.c b/sys/arch/i386/stand/libsa/biosdev.c
index aae4f586e13..68bb2f40339 100644
--- a/sys/arch/i386/stand/libsa/biosdev.c
+++ b/sys/arch/i386/stand/libsa/biosdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: biosdev.c,v 1.66 2003/09/20 05:23:42 fgsch Exp $ */
+/* $OpenBSD: biosdev.c,v 1.67 2003/11/27 00:33:24 espie Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -180,6 +180,7 @@ CHS_rw(int rw, int dev, int cyl, int head, int sect, int nsect, void *buf)
{
int rv;
+ rw = rw == F_READ ? 2 : 3;
BIOS_regs.biosr_es = (u_int32_t)buf >> 4;
__asm __volatile ("movb %b7, %h1\n\t"
"movb %b6, %%dh\n\t"
@@ -194,7 +195,7 @@ CHS_rw(int rw, int dev, int cyl, int head, int sect, int nsect, void *buf)
: "=a" (rv)
: "0" (nsect), "d" (dev), "c" (cyl),
"b" (buf), "m" (sect), "m" (head),
- "m" ((rw == F_READ)? 2: 3)
+ "m" (rw)
: "cc", "memory");
return (rv & 0xff)? rv >> 8 : 0;