qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [patch] Make _sysctl less broken
Date: Sat, 11 Sep 2004 19:48:05 +0100	[thread overview]
Message-ID: <200409111948.05182.paul@codesourcery.com> (raw)

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;

             reply	other threads:[~2004-09-11 18:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-11 18:48 Paul Brook [this message]
2004-09-13 21:22 ` [Qemu-devel] [patch] Make _sysctl less broken Fabrice Bellard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200409111948.05182.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).