[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [patch] Make _sysctl less broken

From: Paul Brook
Subject: [Qemu-devel] [patch] Make _sysctl less broken
Date: Sat, 11 Sep 2004 19:48:05 +0100
User-agent: KMail/1.7

Qemu doesn't currently implement the _sysctl linux syscall, and complains 
loudly when it is used.

For some reason my Debian arm-linux chroot calls this syscall extensively, and 
the "Unsupported syscall" errors were causing problems.

The patch below makes it always return ENOTDIR. The sysctl names vary between 
kernel versions, so user applications should already gracefully accept this.


Index: syscall.c
RCS file: /cvsroot/qemu/qemu/linux-user/syscall.c,v
retrieving revision 1.50
diff -u -p -r1.50 syscall.c
--- syscall.c 19 Jun 2004 16:59:03 -0000 1.50
+++ syscall.c 11 Sep 2004 18:35:28 -0000
@@ -2600,7 +2624,9 @@ long do_syscall(void *cpu_env, int num, 
         ret = get_errno(fdatasync(arg1));
     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;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]