#include "file.h"
-#include "debug.h"
-#include "lib.h"
-#include "malloc.h"
#include "directory.h"
#include "filehdr.h"
#include "filesys.h"
+#include "lib/debug.h"
+#include "lib/lib.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);
file_ofs += chunk_size;
bytes_written += chunk_size;
}
- free (file->bounce);
return bytes_written;
}