diff options
author | rsc <devnull@localhost> | 2007-04-08 01:33:31 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2007-04-08 01:33:31 +0000 |
commit | 86190ea39d2f42af86b9a7ffefaf32f385040f5c (patch) | |
tree | c007636c825965a0ed7767f113426128fb550f8e /src/cmd/vbackup | |
parent | 4f6d2bb1e8e38aaeeeabb159272da19718bfb05d (diff) | |
download | plan9port-86190ea39d2f42af86b9a7ffefaf32f385040f5c.tar.gz plan9port-86190ea39d2f42af86b9a7ffefaf32f385040f5c.tar.bz2 plan9port-86190ea39d2f42af86b9a7ffefaf32f385040f5c.zip |
complain loudly about vtwrite failure
Diffstat (limited to 'src/cmd/vbackup')
-rw-r--r-- | src/cmd/vbackup/vbackup.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cmd/vbackup/vbackup.c b/src/cmd/vbackup/vbackup.c index 42e4f7ba..8e7246c3 100644 --- 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); |