summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/i386/stand/boot/cmd.c8
-rw-r--r--sys/arch/i386/stand/libsa/biosdev.h6
-rw-r--r--sys/arch/i386/stand/libsa/biostime.S8
-rw-r--r--sys/stand/boot/cmd.c8
4 files changed, 20 insertions, 10 deletions
diff --git a/sys/arch/i386/stand/boot/cmd.c b/sys/arch/i386/stand/boot/cmd.c
index c423016a880..66935bec89f 100644
--- a/sys/arch/i386/stand/boot/cmd.c
+++ b/sys/arch/i386/stand/boot/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.10 1997/04/21 20:03:30 mickey Exp $ */
+/* $OpenBSD: cmd.c,v 1.11 1997/04/21 20:20:25 mickey Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -179,7 +179,11 @@ readline(buf, to)
for (i = to; i-- && !ischar(); )
#ifndef _TEST
- usleep(100000);
+ if ((to = usleep(100000))) {
+ printf ("usleep failed (%d)\n", to);
+ i = 1;
+ break;
+ }
#else
;
#endif
diff --git a/sys/arch/i386/stand/libsa/biosdev.h b/sys/arch/i386/stand/libsa/biosdev.h
index c20004f32d8..43dcbdc100f 100644
--- a/sys/arch/i386/stand/libsa/biosdev.h
+++ b/sys/arch/i386/stand/libsa/biosdev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: biosdev.h,v 1.5 1997/04/18 06:54:42 weingart Exp $ */
+/* $OpenBSD: biosdev.h,v 1.6 1997/04/21 20:20:27 mickey Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -50,7 +50,7 @@ int biosioctl __P((struct open_file *, u_long, void *));
/* biosdisk.S */
u_int16_t biosdinfo __P((int dev));
-int biosdreset __P((void));
+int biosdreset __P((void));
int biosread __P((int dev, int cyl, int hd, int sect, int nsect, void *));
int bioswrite __P((int dev, int cyl, int hd, int sect, int nsect, void *));
@@ -70,5 +70,5 @@ int com_ischar __P((void));
u_int biosmem __P((void));
/* biostime.S */
-void usleep __P((u_long));
+int usleep __P((u_long));
#endif
diff --git a/sys/arch/i386/stand/libsa/biostime.S b/sys/arch/i386/stand/libsa/biostime.S
index dbe22ecc06e..0640542fce5 100644
--- a/sys/arch/i386/stand/libsa/biostime.S
+++ b/sys/arch/i386/stand/libsa/biostime.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: biostime.S,v 1.4 1997/04/21 19:52:51 mickey Exp $ */
+/* $OpenBSD: biostime.S,v 1.5 1997/04/21 20:20:28 mickey Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -50,8 +50,10 @@ ENTRY(usleep)
movb $0x86, %ah
BIOSINT(0x15)
- setnc %al
- movzbl %al, %eax
+ xorb %al, %al
+ jnc 1f
+ movl %ah, %al
+1: movzbl %al, %eax
popl %ecx
ret
diff --git a/sys/stand/boot/cmd.c b/sys/stand/boot/cmd.c
index c423016a880..66935bec89f 100644
--- a/sys/stand/boot/cmd.c
+++ b/sys/stand/boot/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.10 1997/04/21 20:03:30 mickey Exp $ */
+/* $OpenBSD: cmd.c,v 1.11 1997/04/21 20:20:25 mickey Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -179,7 +179,11 @@ readline(buf, to)
for (i = to; i-- && !ischar(); )
#ifndef _TEST
- usleep(100000);
+ if ((to = usleep(100000))) {
+ printf ("usleep failed (%d)\n", to);
+ i = 1;
+ break;
+ }
#else
;
#endif