X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffilesys%2Ffilehdr.c;h=58179128ae27782bfbc5c4b1fdf5af244484ec4f;hb=b6b1e6db07a20a0b3025c2ae62a58e80c1af841b;hp=d7d2cc2af52ba24cc31f21419dd606c28f6a0fec;hpb=b6f0a18e4128aee1b4213faa0d2d655083016b49;p=pintos-anon diff --git a/src/filesys/filehdr.c b/src/filesys/filehdr.c index d7d2cc2..5817912 100644 --- a/src/filesys/filehdr.c +++ b/src/filesys/filehdr.c @@ -1,9 +1,9 @@ -#include "filehdr.h" -#include "bitmap.h" -#include "debug.h" -#include "malloc.h" -#include "filesys.h" -#include "lib.h" +#include "filesys/filehdr.h" +#include +#include +#include +#include "filesys/filesys.h" +#include "threads/malloc.h" /* Allocates sectors from bitmap B for the content of a file whose size is LENGTH bytes, and returns a new `struct filehdr' @@ -122,7 +122,7 @@ filehdr_print (const struct filehdr *h) { size_t i; - printk ("File header: %jd bytes, %zd sectors (", + printf ("File header: %jd bytes, %zd sectors (", (intmax_t) h->length, h->sector_cnt); /* This loop could be unsafe for large h->sector_cnt, can you @@ -130,8 +130,8 @@ filehdr_print (const struct filehdr *h) for (i = 0; i < h->sector_cnt; i++) { if (i != 0) - printk (", "); - printk ("%jd", (intmax_t) h->sectors[i]); + printf (", "); + printf ("%jd", (intmax_t) h->sectors[i]); } - printk (")\n"); + printf (")\n"); }