Commit 802659181ef0caf82db06e355025e1bcfbfc4622
1 parent
f941aa25
Userland mount syscall emulation, by Kirill A. Shutemov.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2428 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
12 additions
and
2 deletions
linux-user/syscall.c
... | ... | @@ -2163,8 +2163,18 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, |
2163 | 2163 | ret = get_errno(getpid()); |
2164 | 2164 | break; |
2165 | 2165 | case TARGET_NR_mount: |
2166 | - /* need to look at the data field */ | |
2167 | - goto unimplemented; | |
2166 | + { | |
2167 | + /* need to look at the data field */ | |
2168 | + void *p2, *p3; | |
2169 | + p = lock_user_string(arg1); | |
2170 | + p2 = lock_user_string(arg2); | |
2171 | + p3 = lock_user_string(arg3); | |
2172 | + ret = get_errno(mount(p, p2, p3, (unsigned long)arg4, (const void *)arg5)); | |
2173 | + unlock_user(p, arg1, 0); | |
2174 | + unlock_user(p2, arg2, 0); | |
2175 | + unlock_user(p3, arg3, 0); | |
2176 | + break; | |
2177 | + } | |
2168 | 2178 | case TARGET_NR_umount: |
2169 | 2179 | p = lock_user_string(arg1); |
2170 | 2180 | ret = get_errno(umount(p)); | ... | ... |