diff options
| author | rsc <devnull@localhost> | 2005-03-01 20:56:27 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2005-03-01 20:56:27 +0000 |
| commit | c31f81ac8b402e72acf552eb9b0740a700000e8b (patch) | |
| tree | 518817a9703a3a088a4a3e91ada041d703ec9cc1 /src/lib9pclient/open.c | |
| parent | 6c78172831f45937b48e96c2bba5bdd04196d020 (diff) | |
| download | plan9port-c31f81ac8b402e72acf552eb9b0740a700000e8b.tar.gz plan9port-c31f81ac8b402e72acf552eb9b0740a700000e8b.zip | |
open: preserve error on failed open
write: handle offset correctly for fswrite
Diffstat (limited to 'src/lib9pclient/open.c')
| -rw-r--r-- | src/lib9pclient/open.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib9pclient/open.c b/src/lib9pclient/open.c index e9fb981b..2317bbb7 100644 --- a/src/lib9pclient/open.c +++ b/src/lib9pclient/open.c @@ -7,6 +7,7 @@ CFid* fsopen(CFsys *fs, char *name, int mode) { + char e[ERRMAX]; CFid *fid; Fcall tx, rx; @@ -16,7 +17,9 @@ fsopen(CFsys *fs, char *name, int mode) tx.fid = fid->fid; tx.mode = mode; if(_fsrpc(fs, &tx, &rx, 0) < 0){ + rerrstr(e, sizeof e); fsclose(fid); + errstr(e, sizeof e); return nil; } fid->mode = mode; |
