X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffilesys%2Ffile.c;h=e1a70f31bb150cc6ffdf0aec62e4c976b27937c7;hb=f2f8875638593bd5365cfd6a5ba7c9578e52322f;hp=e16ff5fc695630cc55b4571f36d27a9d1f3e3fbb;hpb=621963e2a383d53b2c5eca627102625421b46545;p=pintos-anon diff --git a/src/filesys/file.c b/src/filesys/file.c index e16ff5f..e1a70f3 100644 --- a/src/filesys/file.c +++ b/src/filesys/file.c @@ -1,13 +1,13 @@ -#include "file.h" -#include "debug.h" -#include "lib.h" -#include "malloc.h" -#include "directory.h" -#include "filehdr.h" -#include "filesys.h" +#include "filesys/file.h" +#include +#include +#include "filesys/directory.h" +#include "filesys/filehdr.h" +#include "filesys/filesys.h" +#include "threads/malloc.h" bool -file_open (struct file *file, disk_sector_no hdr_sector) +file_open (struct file *file, disk_sector_t hdr_sector) { file->hdr = filehdr_read (hdr_sector); file->bounce = malloc (DISK_SECTOR_SIZE); @@ -119,7 +119,6 @@ file_write_at (struct file *file, const void *buffer_, off_t size, file_ofs += chunk_size; bytes_written += chunk_size; } - free (file->bounce); return bytes_written; }