summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-03-15 11:53:01 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-03-15 11:53:01 +0100
commit978506ef525e7901b62602180969e9d5a8452ba4 (patch)
tree0fd96b3c19db78df720f88e05fdbc295c63dff68
parent95ef749e393eae8e3ea578fa69f88eaa1987580e (diff)
downloadpintos-978506ef525e7901b62602180969e9d5a8452ba4.tar.gz
check the correct seek parameter
-rw-r--r--src/userprog/build/fail4
-rw-r--r--src/userprog/syscall.c2
2 files changed, 1 insertions, 5 deletions
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);