/** @file */
#include "disk.h"
#include "parsing.h"
#include <stdlib.h>
#include <sys/mman.h>

int main() {

  disk *drive = mmap(NULL, sizeof(disk), PROT_READ | PROT_WRITE,
                     MAP_SHARED | MAP_ANONYMOUS, -1,
                     0); // pour partager la mémoire entre le père et ses fils
  if (access("disk", F_OK) == 0) {
    *drive = open_disk("disk");
  } else
    *drive = create_disk();

  open_seyshell(drive);

  return EXIT_SUCCESS;
}