From 9bc68d97e4b1d11bdcaf19365400c9c12fa8a068 Mon Sep 17 00:00:00 2001
From: Alex Stratford <alexander3.stratford@live.uwe.ac.uk>
Date: Wed, 4 Dec 2019 11:04:18 +0000
Subject: [PATCH] Fixed errors syscall_open.c line 12: Added dependency for
 filesys_open line 19: Changed to filesys_open

---
 userprog/syscall.c      | 4 ++--
 userprog/syscall_open.c | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/userprog/syscall.c b/userprog/syscall.c
index 0773f82..4580d7f 100644
--- a/userprog/syscall.c
+++ b/userprog/syscall.c
@@ -59,8 +59,8 @@ syscall_handler (struct intr_frame *f UNUSED)
     syscall_halt(f);
     break;
   case SYSCALL_EXIT:
-	  syscall_exit(f);
-	  break;
+	syscall_exit(f);
+	break;
   case SYSCALL_CREATE:
     syscall_create(f);
     break;
diff --git a/userprog/syscall_open.c b/userprog/syscall_open.c
index 783c561..d775581 100644
--- a/userprog/syscall_open.c
+++ b/userprog/syscall_open.c
@@ -8,14 +8,15 @@
 
 #include "system_calls.h"
 #include "threads/interrupt.h" // Dependency for intr_frame struct
-#include "filesys/file.h" // Dependency for file_open and file struct
+#include "filesys/file.h" // Dependency for file struct
+#include "filesys/filesys.h" // Dependency for filesys_open
 
 void syscall_open(struct intr_frame *f) {
 	//struct file_map f_map; // Create f_map struct instance
 	// pop off first int argument from interrupt frame
 	char* file_name = (void*)(*(int*)f->esp + 1);
 	// Described in system_calls.h, opens the file
-	struct file *file = file_open(file_name);
+	struct file *file = filesys_open(file_name);
 	if (file == NULL) { // Checking if file is empty or non-existent
 		f->eax = -1; // Returning a failure state
 		return;
-- 
GitLab