summaryrefslogtreecommitdiffstats
path: root/sys/boot/pc98
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2011-04-16 06:20:49 +0000
committernyan <nyan@FreeBSD.org>2011-04-16 06:20:49 +0000
commit82c088adf3c07fdfaaea9530b4e5864d49514517 (patch)
tree31e35bdb54510f6c4ac4b657504e2704ffea4624 /sys/boot/pc98
parent89d72449fdf91333a1b81a65107d82cca75083b2 (diff)
downloadFreeBSD-src-82c088adf3c07fdfaaea9530b4e5864d49514517.zip
FreeBSD-src-82c088adf3c07fdfaaea9530b4e5864d49514517.tar.gz
MFi386: revisions 220389 and 220392
- Mark getc() as inline, this has no effect on gcc but helps clang. - Move getc() body before xgetc() so gcc does not emit a warning about function having no body.
Diffstat (limited to 'sys/boot/pc98')
-rw-r--r--sys/boot/pc98/boot2/boot2.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/sys/boot/pc98/boot2/boot2.c b/sys/boot/pc98/boot2/boot2.c
index c7d0e54..6fb400a 100644
--- a/sys/boot/pc98/boot2/boot2.c
+++ b/sys/boot/pc98/boot2/boot2.c
@@ -150,7 +150,7 @@ static int drvread(void *, unsigned);
static int keyhit(unsigned);
static int xputc(int);
static int xgetc(int);
-static int getc(int);
+static inline int getc(int);
static void memcpy(void *, const void *, int);
static void
@@ -779,6 +779,18 @@ xputc(int c)
}
static int
+getc(int fn)
+{
+ v86.addr = 0x18;
+ v86.eax = fn << 8;
+ v86int();
+ if (fn)
+ return (v86.ebx >> 8) & 0x01;
+ else
+ return v86.eax & 0xff;
+}
+
+static int
xgetc(int fn)
{
if (OPT_CHECK(RBX_NOINTR))
@@ -792,15 +804,3 @@ xgetc(int fn)
return 0;
}
}
-
-static int
-getc(int fn)
-{
- v86.addr = 0x18;
- v86.eax = fn << 8;
- v86int();
- if (fn)
- return (v86.ebx >> 8) & 0x01;
- else
- return v86.eax & 0xff;
-}
OpenPOWER on IntegriCloud