venti: import changes from plan 9

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/4523057
This commit is contained in:
David du Colombier 2011-06-02 09:33:56 -04:00 committed by Russ Cox
parent 7fb06adf54
commit f5a8ea6fd8
21 changed files with 141 additions and 63 deletions

View file

@ -75,7 +75,7 @@ rdarena(Arena *arena, u64int offset)
e = arena->base + arena->size;
if(offset != ~(u64int)0) {
if(offset >= e - a)
sysfatal("bad offset %#llx >= %#llx\n", offset, e - a);
sysfatal("bad offset %#llx >= %#llx", offset, e - a);
aa = offset;
} else
aa = 0;
@ -87,8 +87,8 @@ rdarena(Arena *arena, u64int offset)
break;
if(a < aa || ci.type == VtCorruptType){
if(ci.type == VtCorruptType)
fprint(2, "corrupt at %#llx: +%d\n",
a, ClumpSize+ci.size);
fprint(2, "%s: corrupt clump read at %#llx: +%d\n",
argv0, a, ClumpSize+ci.size);
continue;
}
lump = loadclump(arena, a, 0, &cl, score, 0);
@ -187,7 +187,7 @@ threadmain(int argc, char *argv[])
sysfatal("corrupted arena header: %r");
if(aoffset+head.size > part->size)
sysfatal("arena is truncated: want %llud bytes have %llud\n",
sysfatal("arena is truncated: want %llud bytes have %llud",
head.size, part->size);
partblocksize(part, head.blocksize);