From 978506ef525e7901b62602180969e9d5a8452ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 15 Mar 2021 11:53:01 +0100 Subject: check the correct seek parameter --- src/userprog/build/fail | 4 ---- src/userprog/syscall.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'src/userprog') diff --git a/src/userprog/build/fail b/src/userprog/build/fail index d6016ef..e69de29 100644 --- a/src/userprog/build/fail +++ b/src/userprog/build/fail @@ -1,4 +0,0 @@ -FAIL tests/filesys/base/lg-random -FAIL tests/filesys/base/sm-random -FAIL tests/filesys/base/syn-remove -FAIL tests/filesys/base/syn-write diff --git a/src/userprog/syscall.c b/src/userprog/syscall.c index b9acb17..c1308ca 100644 --- a/src/userprog/syscall.c +++ b/src/userprog/syscall.c @@ -325,7 +325,7 @@ syscall_handler (struct intr_frame *f UNUSED) case 10: // seek fd_i = INTR_ESP (1, int); - position = INTR_ESP (3, unsigned); + position = INTR_ESP (2, unsigned); CHECK_PTR_AND_MAYBE_EXIT (fd_i); CHECK_PTR_AND_MAYBE_EXIT (position); seek (*fd_i, *position); -- cgit v1.2.1