qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Remove abuse of kernel headers.
Date: Thu, 08 Jun 2006 11:20:34 +0100	[thread overview]
Message-ID: <1149762034.13596.132.camel@pmac.infradead.org> (raw)
In-Reply-To: <1149718365.1608.35.camel@shinybook.infradead.org>

On Wed, 2006-06-07 at 23:12 +0100, David Woodhouse wrote:
> The _syscallX() macros in the kernel's private headers are not suitable
> for use in userspace. This patch switches from abusing those to using
> the syscall() function which glibc provides. 

One more instance...

--- qemu-0.8.1/target-i386/helper2.c.orig	2006-06-08 11:09:41.000000000 +0100
+++ qemu-0.8.1/target-i386/helper2.c	2006-06-08 11:10:30.000000000 +0100
@@ -35,7 +35,10 @@
 #include <linux/unistd.h>
 #include <linux/version.h>
 
-_syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount)
+int modify_ldt(int func, void *ptr, unsigned long bytecount)
+{
+	return syscall(__NR_modify_ldt, func, ptr, bytecount);
+}
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 66)
 #define modify_ldt_ldt_s user_desc

-- 
dwmw2

      reply	other threads:[~2006-06-08 10:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-07 22:12 [Qemu-devel] [PATCH] Remove abuse of kernel headers David Woodhouse
2006-06-08 10:20 ` David Woodhouse [this message]

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=1149762034.13596.132.camel@pmac.infradead.org \
    --to=dwmw2@infradead.org \
    --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).