summary refs log tree commit diff stats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-17 22:25:41 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-17 22:25:41 +0000
commit802659181ef0caf82db06e355025e1bcfbfc4622 (patch)
tree8eb6eede487c5195195cc84ace66a45bd5d130de /linux-user/syscall.c
parentf941aa256f2254c3f35f00fcf5d7f20dba55a5b7 (diff)
downloadfocaccia-qemu-802659181ef0caf82db06e355025e1bcfbfc4622.tar.gz
focaccia-qemu-802659181ef0caf82db06e355025e1bcfbfc4622.zip
Userland mount syscall emulation, by Kirill A. Shutemov.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2428 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 3506ece1ec..f3f97b0d57 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2163,8 +2163,18 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
         ret = get_errno(getpid());
         break;
     case TARGET_NR_mount:
-        /* need to look at the data field */
-        goto unimplemented;
+		{
+			/* need to look at the data field */
+			void *p2, *p3;
+			p = lock_user_string(arg1);
+			p2 = lock_user_string(arg2);
+			p3 = lock_user_string(arg3);
+			ret = get_errno(mount(p, p2, p3, (unsigned long)arg4, (const void *)arg5));
+			unlock_user(p, arg1, 0);
+			unlock_user(p2, arg2, 0);
+			unlock_user(p3, arg3, 0);
+			break;
+		}
     case TARGET_NR_umount:
         p = lock_user_string(arg1);
         ret = get_errno(umount(p));