xv6

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 1aee6a6c4f1227dd4737ba5c88306acfba893828
parent 8d774afb2d45592d85725474a704ac99b0624d2c
Author: Austin Clements <amdragon@mit.edu>
Date:   Tue, 31 Aug 2010 16:01:38 -0400

Hopefully get the printf size spec right, regardless of compiler.

Diffstat:
Mmkfs.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mkfs.c b/mkfs.c @@ -82,7 +82,7 @@ main(int argc, char *argv[]) usedblocks = ninodes / IPB + 3 + bitblocks; freeblock = usedblocks; - printf("used %d (bit %d ninode %lu) free %u total %d\n", usedblocks, + printf("used %d (bit %d ninode %zu) free %u total %d\n", usedblocks, bitblocks, ninodes/IPB + 1, freeblock, nblocks+usedblocks); assert(nblocks + usedblocks == size); @@ -230,7 +230,7 @@ balloc(int used) for(i = 0; i < used; i++) { buf[i/8] = buf[i/8] | (0x1 << (i%8)); } - printf("balloc: write bitmap block at sector %lu\n", ninodes/IPB + 3); + printf("balloc: write bitmap block at sector %zu\n", ninodes/IPB + 3); wsect(ninodes / IPB + 3, buf); }