summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/lib/common.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2008-03-11 21:48:38 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2008-03-11 21:48:38 +0100
commitd9016f7cced7c0a1168a56386e0d113c782072a7 (patch)
tree40b2a770dd0b10721c29fc6046ba754f1afaed95 /arch/sandbox/lib/common.c
parentecc241774aa7c8c00d0c6f2f382867a0e9b456b1 (diff)
downloadbarebox-d9016f7cced7c0a1168a56386e0d113c782072a7.tar.gz
barebox-d9016f7cced7c0a1168a56386e0d113c782072a7.tar.xz
do not sleep if read gets EAGAIN. Must be some testing leftover
Diffstat (limited to 'arch/sandbox/lib/common.c')
-rw-r--r--arch/sandbox/lib/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sandbox/lib/common.c b/arch/sandbox/lib/common.c
index 21ec720d7c..ee2a93ce54 100644
--- a/arch/sandbox/lib/common.c
+++ b/arch/sandbox/lib/common.c
@@ -97,7 +97,7 @@ int linux_tstc(int fd)
/*
* We set the timeout here to 100us, because otherwise
* U-Boot would eat all cpu resources while waiting
- * for input.
+ * for input.
*/
ret = select(fd + 1, &rfds, NULL, NULL, &tv);
@@ -166,7 +166,7 @@ int linux_read(int fd, void *buf, size_t count)
reset_cpu(0);
} else if (ret == -1) {
if (errno == EAGAIN)
- usleep(100);
+ return -errno;
else if (errno == EINTR)
continue;
else {