Skip to content
Snippets Groups Projects
Commit 88ff6a98 authored by a2-stratford's avatar a2-stratford
Browse files

Fixed other issues

parent 4157d6d9
Branches
No related tags found
2 merge requests!22Merge Feature/system calls,!6Implemented filesize system call
......@@ -79,6 +79,9 @@ syscall_handler (struct intr_frame *f UNUSED)
case SYSCALL_OPEN:
syscall_open(f);
break;
case SYSCALL_FILESIZE:
syscall_filesize(f);
break;
default:
printf ("WARNING: Invalid Syscall (%d)\n", syscall_number);
thread_exit ();
......
......@@ -49,6 +49,11 @@ void syscall_write(struct intr_frame *f);
*/
void syscall_open(struct intr_frame *f);
/*
* Returns the size, in bytes, of the file open as fd.
*/
void syscall_filesize(struct intr_frame *f);
/*
* Deletes the file called file. Returns true if successful, false otherwise.
* A file may be removed regardless of whether it is open or closed, and
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment