plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 86190ea39d2f42af86b9a7ffefaf32f385040f5c
parent 4f6d2bb1e8e38aaeeeabb159272da19718bfb05d
Author: rsc <devnull@localhost>
Date:   Sun,  8 Apr 2007 01:33:31 +0000

complain loudly about vtwrite failure

Diffstat:
Msrc/cmd/vbackup/vbackup.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/cmd/vbackup/vbackup.c b/src/cmd/vbackup/vbackup.c @@ -450,8 +450,12 @@ myvtwrite(VtConn *z, uchar score[VtScoreSize], uint type, uchar *buf, int n) { WriteReq wr; - if(nwritethread == 0) - return vtwrite(z, score, type, buf, n); + if(nwritethread == 0){ + n = vtwrite(z, score, type, buf, n); + if(n < 0) + sysfatal("vtwrite: %r"); + return n; + } wr.p = packetalloc(); packetappend(wr.p, buf, n);