summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/sys/net.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/sys/net.c b/common/sys/net.c
index 5bf9dc5e..cf6ca658 100644
--- a/common/sys/net.c
+++ b/common/sys/net.c
@@ -191,7 +191,8 @@ int toread(int fd, void *buf, int len)
if( (l = read(fd, buf, len)) <= 0 ) {
if (l < 0 && (errno == EINTR || errno == EAGAIN))
continue;
- return l;
+ // XXX we define toread/towrite as '-1 for EOF and error'.
+ return -1; // l;
}else{
buf += l;
len -= l;
@@ -209,7 +210,8 @@ int towrite(int fd, const void *buf, int len)
if( (l = write(fd, buf, len)) <= 0){
if (l < 0 && (errno == EINTR || errno == EAGAIN))
continue;
- return l;
+ // XXX we define toread/towrite as '-1 for EOF and error'.
+ return -1; // l;
}else{
buf += l;
len -= l;