From a20a146803c2e193d8173e9bb2a0b3f74245549d Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 16 Jan 2005 21:15:30 +0000 Subject: make vacfs work; thanks to lucho --- src/cmd/vac/fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cmd/vac/fs.c') diff --git a/src/cmd/vac/fs.c b/src/cmd/vac/fs.c index e6902d59..0034a27d 100644 --- a/src/cmd/vac/fs.c +++ b/src/cmd/vac/fs.c @@ -25,7 +25,7 @@ readscore(int fd, uchar score[VtScoreSize]) int n; n = readn(fd, buf, sizeof(buf)-1); - if(n < sizeof(buf)) { + if(n < sizeof(buf)-1) { werrstr("short read"); return -1; } @@ -92,7 +92,7 @@ vacfsopenscore(VtConn *z, u8int *score, int mode, int ncache) memmove(fs->score, score, VtScoreSize); fs->mode = mode; - memmove(e.score, score, VtScoreSize); + memmove(e.score, rt.score, VtScoreSize); e.gen = 0; e.psize = (rt.blocksize/VtEntrySize)*VtEntrySize; e.dsize = rt.blocksize; -- cgit v1.2.3