aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarret Kelly <gdk@google.com>2016-04-20 10:51:22 -0400
committerAndrew Waterman <waterman@cs.berkeley.edu>2016-04-20 10:58:48 -0700
commit1baf122e28fc19af687033358d078bf8e6bab741 (patch)
treec5bc18454d06d07e768b71c75c332ad319ff2ba9
parentd114ddb3ec7881149c2ce2c7cb41ecdf5a5aaa44 (diff)
downloadriscv-pk-1baf122e28fc19af687033358d078bf8e6bab741.zip
riscv-pk-1baf122e28fc19af687033358d078bf8e6bab741.tar.gz
riscv-pk-1baf122e28fc19af687033358d078bf8e6bab741.tar.bz2
pk: proxy chdir syscall to fesvr
-rw-r--r--pk/syscall.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pk/syscall.c b/pk/syscall.c
index 66c07ef..1c9e234 100644
--- a/pk/syscall.c
+++ b/pk/syscall.c
@@ -382,6 +382,11 @@ ssize_t sys_writev(int fd, const long* iov, int cnt)
return ret;
}
+int sys_chdir(const char *path)
+{
+ return frontend_syscall(SYS_chdir, (uintptr_t)path, 0, 0, 0, 0, 0, 0);
+}
+
int sys_getdents(int fd, void* dirbuf, int count)
{
return 0; //stub
@@ -442,6 +447,7 @@ long do_syscall(long a0, long a1, long a2, long a3, long a4, long a5, unsigned l
[SYS_getrusage] = sys_stub_nosys,
[SYS_getrlimit] = sys_stub_nosys,
[SYS_setrlimit] = sys_stub_nosys,
+ [SYS_chdir] = sys_chdir,
};
const static void* old_syscall_table[] = {