qemu-devel
[Top][All Lists]
Advanced

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

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


From: Fabrice Bellard
Subject: Re: [Qemu-devel] [patch] Make _sysctl less broken
Date: Mon, 13 Sep 2004 23:22:31 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Applied.

Fabrice.

Paul Brook wrote:
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.

Paul

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));
         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;


_______________________________________________
Qemu-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/qemu-devel









reply via email to

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