summaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-09-13 21:41:04 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-09-13 21:41:04 +0000
commit29e619b1e8b1b79255009451e26c1bdbd9338fa6 (patch)
treee12bf681812e3ed8b6b47316521df9ff1811e508 /linux-user
parent6f28fb86c99226aea86023b27704b23c4ec3d5a5 (diff)
downloadqemu-29e619b1e8b1b79255009451e26c1bdbd9338fa6.tar.gz
uname + sysctl fix (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1065 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 5b1f7a4cee..9f1b329222 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2392,6 +2392,17 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
break;
case TARGET_NR_uname:
/* no need to transcode because we use the linux syscall */
+ {
+ struct new_utsname * buf;
+
+ buf = (struct new_utsname *)arg1;
+ ret = get_errno(sys_uname(buf));
+ if (!is_error(ret)) {
+ /* Overrite the native machine name with whatever is being
+ emulated. */
+ strcpy (buf->machine, UNAME_MACHINE);
+ }
+ }
ret = get_errno(sys_uname((struct new_utsname *)arg1));
break;
#ifdef TARGET_I386
@@ -2600,7 +2611,9 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
ret = get_errno(fdatasync(arg1));
break;
case TARGET_NR__sysctl:
- goto unimplemented;
+ /* We don't implement this, but ENODIR is always a safe
+ return value. */
+ return -ENOTDIR;
case TARGET_NR_sched_setparam:
{
struct sched_param *target_schp = (void *)arg2;