summaryrefslogtreecommitdiff
path: root/sys/arch/zaurus/stand/zboot/unixdev.c
diff options
context:
space:
mode:
authorUwe Stuehler <uwe@cvs.openbsd.org>2005-04-13 04:33:48 +0000
committerUwe Stuehler <uwe@cvs.openbsd.org>2005-04-13 04:33:48 +0000
commitff33f430a373c5630d1d0829e64021f3d8b58251 (patch)
tree42b89ad78df044fc8258efda5fa16d481d777e4f /sys/arch/zaurus/stand/zboot/unixdev.c
parent9e22fe2b0b264f8998a850a93b533b01a5a09015 (diff)
boot when then timeout expires; prodded by drahn@ dlg@ and others
Diffstat (limited to 'sys/arch/zaurus/stand/zboot/unixdev.c')
-rw-r--r--sys/arch/zaurus/stand/zboot/unixdev.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/arch/zaurus/stand/zboot/unixdev.c b/sys/arch/zaurus/stand/zboot/unixdev.c
index 400b6adc2dc..e4d713a8e6f 100644
--- a/sys/arch/zaurus/stand/zboot/unixdev.c
+++ b/sys/arch/zaurus/stand/zboot/unixdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: unixdev.c,v 1.3 2005/01/24 22:20:33 uwe Exp $ */
+/* $OpenBSD: unixdev.c,v 1.4 2005/04/13 04:33:47 uwe Exp $ */
/*
* Copyright (c) 1996-1998 Michael Shalayeff
@@ -38,6 +38,9 @@
#include "libsa.h"
#include <lib/libsa/unixdev.h>
+/* unixsys.S */
+int uselect(int, fd_set *, fd_set *, fd_set *, struct timeval *);
+
int
unixstrategy(void *devdata, int rw, daddr_t blk, size_t size, void *buf,
size_t *rsize)
@@ -170,11 +173,16 @@ unix_getc(dev_t dev)
int rc;
tv.tv_sec = 0;
- tv.tv_usec = 100000;
+ tv.tv_usec = 0;
FD_ZERO(&fdset);
FD_SET(0, &fdset);
- if ((rc = syscall(SYS_select, 1, &fdset, NULL, NULL, &tv)) <= 0)
+#if 0
+ rc = syscall(SYS_select, 1, &fdset, NULL, NULL, &tv);
+#else
+ rc = uselect(1, &fdset, NULL, NULL, &tv);
+#endif
+ if (rc <= 0)
return 0;
else
return 1;
@@ -188,7 +196,7 @@ unix_getc(dev_t dev)
time_t
getsecs(void)
{
- return 1;
+ return (time_t)syscall(__NR_time, NULL);
}
void