tuse part->size - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 1726f602fe7797cbf8166b6b9731a4f34bb9fedb
(DIR) parent a9ecda2da9715bde740aed19f327045ff9260560
(HTM) Author: rsc <devnull@localhost>
Date: Sat, 29 Oct 2005 17:40:49 +0000
use part->size
Diffstat:
M src/cmd/venti/srv/printarena.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
(DIR) diff --git a/src/cmd/venti/srv/printarena.c b/src/cmd/venti/srv/printarena.c
t@@ -68,7 +68,6 @@ threadmain(int argc, char *argv[])
Arena *arena;
u64int offset, aoffset;
Part *part;
- Dir *d;
uchar buf[8192];
ArenaHead head;
t@@ -98,9 +97,6 @@ threadmain(int argc, char *argv[])
ventifmtinstall();
statsinit();
- if((d = dirstat(file)) == nil)
- sysfatal("can't stat file %s: %r", file);
-
part = initpart(file, OREAD|ODIRECT);
if(part == nil)
sysfatal("can't open file %s: %r", file);
t@@ -114,9 +110,9 @@ threadmain(int argc, char *argv[])
head.version, ANameSize, head.name, head.blocksize,
head.size, head.clumpmagic);
- if(aoffset+head.size > d->length)
+ if(aoffset+head.size > part->size)
sysfatal("arena is truncated: want %llud bytes have %llud\n",
- head.size, d->length);
+ head.size, part->size);
partblocksize(part, head.blocksize);
initdcache(8 * MaxDiskBlock);