summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-04-21 20:20:29 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-04-21 20:20:29 +0000
commit0baad62aa40e38780a98e1dff56467c9f5011457 (patch)
tree0e9b06b2199c368206aef918310116bab28b3acc
parent63d060a62d84b4e8a55a2dfd461ac1b50528c505 (diff)
usleep testing code
-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