From 65c1d052c96479e316d4eb35edc949363c41570e Mon Sep 17 00:00:00 2001 From: Alex Stratford <alexander3.stratford@live.uwe.ac.uk> Date: Wed, 4 Dec 2019 15:20:28 +0000 Subject: [PATCH] Fixed name issue Fixed wrongly placed asterisk --- userprog/syscall_remove.c | 4 ++-- userprog/system_calls.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/userprog/syscall_remove.c b/userprog/syscall_remove.c index 80dfe36..0b8d308 100644 --- a/userprog/syscall_remove.c +++ b/userprog/syscall_remove.c @@ -13,9 +13,9 @@ #include "filesys/file.h" // Dependency for and file struct #include "filesys/filesys.h" // Dependency for filesys_remove -void syscall_open(struct intr_frame *f) { +void syscall_remove(struct intr_frame *f) { // pop off first int argument from interrupt frame - char* file_name = (void*)(*(int*)f->esp + 1); + char* file_name = (void*)*((int*)f->esp + 1); // Described in filesys.h, opens the file if (filesys_remove(file_name) == false) { // Checking if file is empty or non-existent f->eax = false; // Returning a failure state diff --git a/userprog/system_calls.h b/userprog/system_calls.h index e5dafe5..8dc87c9 100644 --- a/userprog/system_calls.h +++ b/userprog/system_calls.h @@ -55,7 +55,7 @@ void syscall_open(struct intr_frame *f); * Removing an open file does not close it. See Removing an Open File, for * Details. */ -void syscall_open(struct intr_frame *f); +void syscall_remove(struct intr_frame *f); /* * special additional stuff for handling file descriptors because they're annoying -- GitLab