venti: fix format on ulong
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5328046
diff --git a/src/cmd/venti/dump.c b/src/cmd/venti/dump.c
index 44f13e0..212e211 100644
--- a/src/cmd/venti/dump.c
+++ b/src/cmd/venti/dump.c
@@ -50,7 +50,7 @@
Bprint(&bout, "%.*serror unpacking root %V: %r\n", indent*4, spaces, score);
goto out;
}
- Bprint(&bout, "%.*s%V root name=%s type=%s prev=%V bsize=%d\n",
+ Bprint(&bout, "%.*s%V root name=%s type=%s prev=%V bsize=%ld\n",
indent*4, spaces, score, root.name, root.type, root.prev, root.blocksize);
dump(indent+1, root.score, VtDirType);
break;
@@ -62,7 +62,7 @@
Bprint(&bout, "%.*s%d: cannot unpack\n", indent+1, spaces, i);
continue;
}
- Bprint(&bout, "%.*s%d: gen=%#lux psize=%d dsize=%d type=%d flags=%#x size=%llud score=%V\n",
+ Bprint(&bout, "%.*s%d: gen=%#lux psize=%ld dsize=%ld type=%d flags=%#x size=%llud score=%V\n",
(indent+1)*4, spaces, i, e.gen, e.psize, e.dsize, e.type, e.flags, e.size, e.score);
dump(indent+2, e.score, e.type);
}
diff --git a/src/libventi/entry.c b/src/libventi/entry.c
index 6485714..5e9a7c1 100644
--- a/src/libventi/entry.c
+++ b/src/libventi/entry.c
@@ -63,7 +63,7 @@
psize = vttobig(psize);
dsize = vttobig(dsize);
if(psize < 0 || dsize < 0)
- sysfatal("invalid entry psize/dsize: %d/%d", e->psize, e->dsize);
+ sysfatal("invalid entry psize/dsize: %ld/%ld", e->psize, e->dsize);
}
U16PUT(p, psize);
p += 2;
diff --git a/src/libventi/file.c b/src/libventi/file.c
index ebd7199..ec9c1b7 100644
--- a/src/libventi/file.c
+++ b/src/libventi/file.c
@@ -67,7 +67,7 @@
}
if(DEPTH(e.type) < sizetodepth(e.size, e.psize, e.dsize)){
- fprint(2, "depth %ud size %llud psize %ud dsize %ud\n",
+ fprint(2, "depth %ud size %llud psize %lud dsize %lud\n",
DEPTH(e.type), e.size, e.psize, e.dsize);
werrstr("bad depth");
return nil;
diff --git a/src/libventi/root.c b/src/libventi/root.c
index b1a153d..2627ee8 100644
--- a/src/libventi/root.c
+++ b/src/libventi/root.c
@@ -27,7 +27,7 @@
vers |= _VtRootVersionBig;
bsize = vttobig(bsize);
if(bsize < 0)
- sysfatal("invalid root blocksize: %#x", r->blocksize);
+ sysfatal("invalid root blocksize: %#lx", r->blocksize);
}
U16PUT(p, vers);
p += 2;