+#include "filesys/filesys.h"
+#include <debug.h>
+#include <stdio.h>
+#include <string.h>
+#include "filesys/file.h"
+#include "filesys/free-map.h"
+#include "filesys/inode.h"
+#include "filesys/directory.h"
+#include "devices/disk.h"
+
+/* The disk that contains the file system. */
+struct disk *filesys_disk;
+
+static void do_format (void);
+
+/* Initializes the file system module.
+ If FORMAT is true, reformats the file system. */
+void
+filesys_init (bool format)
+{
+ filesys_disk = disk_get (0, 1);
+ if (filesys_disk == NULL)
+ PANIC ("hd0:1 (hdb) not present, file system initialization failed");