diff options
| author | Charles.Forsyth <devnull@localhost> | 2009-05-26 16:06:44 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2009-05-26 16:06:44 +0000 |
| commit | b18a52b7bbe9230f3398a16cfc224f42a7cb393b (patch) | |
| tree | f94aa5eec49ba9bca0a44981dfe18bcc633436a4 /emu | |
| parent | fa871c313191a5a5d28d5cbd18921daaea4d212a (diff) | |
20090526-1706
Diffstat (limited to 'emu')
| -rw-r--r-- | emu/port/devfs-posix.c | 11 | ||||
| -rw-r--r-- | emu/port/exportfs.c | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/emu/port/devfs-posix.c b/emu/port/devfs-posix.c index bd1d9a94..c80406cb 100644 --- a/emu/port/devfs-posix.c +++ b/emu/port/devfs-posix.c @@ -401,10 +401,13 @@ fsread(Chan *c, void *va, long n, vlong offset) qunlock(&FS(c)->oq); }else{ r = pread(FS(c)->fd, va, n, offset); - if(r < 0 && (errno == ESPIPE || errno == EPIPE)){ - r = read(FS(c)->fd, va, n); - if(r < 0) - oserror(); + if(r < 0){ + if(errno == ESPIPE || errno == EPIPE){ + r = read(FS(c)->fd, va, n); + if(r >= 0) + return r; + } + oserror(); } } return r; diff --git a/emu/port/exportfs.c b/emu/port/exportfs.c index 1feae7ae..a52b3239 100644 --- a/emu/port/exportfs.c +++ b/emu/port/exportfs.c @@ -1027,7 +1027,7 @@ Exread(Export *fs, Fcall *t, Fcall *r) Fid *f; Chan *c; Lock *cl; - long off; + vlong off; int dir, n, seek; f = Exgetfid(fs, t->fid); |
