fix problem in cache.
diff --git a/src/libventi/cache.c b/src/libventi/cache.c
index dff32cd..6ed61a0 100644
--- a/src/libventi/cache.c
+++ b/src/libventi/cache.c
@@ -262,7 +262,6 @@
 	 */
 	if(c->nheap == 0){
 		vtcachedump(c);
-abort();
 		sysfatal("vtcachebumpblock: no free blocks in vtCache");
 	}
 	b = c->heap[0];
@@ -305,17 +304,10 @@
 
 	b = &c->block[addr];
 	if(b->addr == NilBlock || b->iostate != BioLocal)
-{
-abort();
 		sysfatal("vtcachelocal: block is not local");
-}
 
 	if(b->type != type)
-{
-print("%d != %d\n", b->type, type);
-abort();
 		sysfatal("vtcachelocal: block has wrong type %d != %d", b->type, type);
-}
 
 	qlock(&c->lk);
 	b->ref++;
@@ -331,9 +323,6 @@
 {
 	VtBlock *b;
 
-if(type >= VtMaxType)
-	abort();
-
 	qlock(&c->lk);
 	b = vtcachebumpblock(c);
 	b->iostate = BioLocal;
@@ -379,6 +368,11 @@
 		qunlock(&c->lk);
 		qlock(&b->lk);
 		b->nlock = 1;
+		if(b->iostate == BioVentiError){
+			werrstr("venti i/o error");
+			vtblockput(b);
+			return nil;
+		}
 		return b;
 	}
 
@@ -410,7 +404,6 @@
 
 	n = vtread(c->z, score, type, b->data, c->blocksize);
 	if(n < 0){
-fprint(2, "vtread: %r\n");
 		b->iostate = BioVentiError;
 		vtblockput(b);
 		return nil;
@@ -494,8 +487,8 @@
 	int n;
 
 	if(b->iostate != BioLocal){
-		abort();
-		sysfatal("vtBlockWrite: not a local block");
+		werrstr("vtblockwrite: not a local block");
+		return -1;
 	}
 
 	c = b->c;
@@ -562,6 +555,7 @@
 int
 vtblockdirty(VtBlock *b)
 {
+	USED(b);
 	return 0;
 }
 
diff --git a/src/libventi/file.c b/src/libventi/file.c
index 50e99f3..0b48707 100644
--- a/src/libventi/file.c
+++ b/src/libventi/file.c
@@ -661,9 +661,7 @@
 mkindices(VtEntry *e, u32int bn, int *index)
 {
 	int i, np;
-	u32int obn;
 
-	obn = bn;
 	memset(index, 0, VtPointerDepth*sizeof(int));
 
 	np = e->psize/VtScoreSize;
@@ -772,7 +770,6 @@
 	return 0;
 
 Err:
-fprint(2, "vtfileblockhash: %r\n");
 	vtblockput(b);
 	return -1;
 }
diff --git a/src/libventi/root.c b/src/libventi/root.c
index c9449af..5b4ccac 100644
--- a/src/libventi/root.c
+++ b/src/libventi/root.c
@@ -44,7 +44,7 @@
 	vers = U16GET(p);
 	if(vers != VtRootVersion) {
 		werrstr("unknown root version");
-		return 0;
+		return -1;
 	}
 	p += 2;
 	memmove(r->name, p, sizeof(r->name));
diff --git a/src/libventi/send.c b/src/libventi/send.c
index 726c402..3e5f20e 100644
--- a/src/libventi/send.c
+++ b/src/libventi/send.c
@@ -1,5 +1,4 @@
 #include <u.h>
-#include <errno.h>
 #include <libc.h>
 #include <venti.h>
 #include "queue.h"
@@ -47,6 +46,16 @@
 	return 1;
 }
 
+static int
+interrupted(void)
+{
+	char e[ERRMAX];
+
+	rerrstr(e, sizeof e);
+	return strstr(e, "interrupted") != nil;
+}
+
+
 static Packet*
 _vtrecv(VtConn *z)
 {
@@ -69,7 +78,7 @@
 		if(0) fprint(2, "%d read hdr\n", getpid());
 		n = read(z->infd, b, MaxFragSize);
 		if(0) fprint(2, "%d got %d (%r)\n", getpid(), n);
-		if(n==0 || (n<0 && errno!=EINTR))
+		if(n==0 || (n<0 && !interrupted()))
 			goto Err;
 		size += n;
 		packettrim(p, 0, size);
@@ -91,7 +100,7 @@
 		if(n > 0)
 			size += n;
 		packettrim(p, 0, size);
-		if(n==0 || (n<0 && errno!=EINTR))
+		if(n==0 || (n<0 && !interrupted()))
 			goto Err;
 	}
 	ventirecvbytes += len;