From 803009d0cef9cd731e5031b775fbf86727b2dfd0 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 26 Nov 2005 18:36:48 +0000 Subject: [PATCH] (fillcache, do_write): Revert the previous revision. The portability issue applies only to sockets, and EWOULDBLOCK isn't defined on all systems. --- src/lib/common/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/common/file.c b/src/lib/common/file.c index 9781ad9b..fdba22b2 100644 --- a/src/lib/common/file.c +++ b/src/lib/common/file.c @@ -276,7 +276,7 @@ fillcache(struct empfile *ep, int start) while (n > 0) { ret = read(ep->fd, p, n); if (ret < 0) { - if (errno != EAGAIN && errno != EWOULDBLOCK) { + if (errno != EAGAIN) { logerror("Error reading %s (%s)", ep->file, strerror(errno)); break; } @@ -319,7 +319,7 @@ do_write(struct empfile *ep, void *buf, int id, int count) while (n > 0) { ret = write(ep->fd, p, n); if (ret < 0) { - if (errno != EAGAIN && errno != EWOULDBLOCK) { + if (errno != EAGAIN) { logerror("Error writing %s (%s)", ep->file, strerror(errno)); /* FIXME if this extended file, truncate back to old size */ return -1;