open: preserve error on failed open

write: handle offset correctly for fswrite
This commit is contained in:
rsc 2005-03-01 20:56:27 +00:00
parent 6c78172831
commit c31f81ac8b
2 changed files with 4 additions and 1 deletions

View file

@ -53,7 +53,7 @@ fspwrite(CFid *fid, void *buf, long n, vlong offset)
want = n - tot;
if(want > msize)
want = msize;
got = _fspwrite(fid, buf, want, offset);
got = _fspwrite(fid, buf+tot, want, offset);
first = 0;
if(got < 0){
if(tot == 0)