Skip to content

Commit

Permalink
Hopefully get the printf size spec right, regardless of compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Clements committed Aug 31, 2010
1 parent 8d774af commit 1aee6a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mkfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 1aee6a6

Please sign in to comment.