From: Riku Voipio <riku.voipio@iki.fi>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] linux-user: fix problems with inotify syscalls
Date: Tue, 31 Mar 2009 00:15:23 +0300 [thread overview]
Message-ID: <20090330211523.GA3633@kos.to> (raw)
In-Reply-To: <1238273386-7652-1-git-send-email-froydnj@codesourcery.com>
On Sat, Mar 28, 2009 at 01:49:46PM -0700, Nathan Froyd wrote:
> The sys_inotify* calls are defined if the target supports them and the
> host supports the necessary syscalls. But the syscalls are handled if
> the target supports them. This situation leads to compilation failures
> when the host doesn't support the necessary syscalls, as the linker will
> complain about undefined functions.
Looks ok to me, this is how the *at syscalls are #ifdeffed as well.
Acked-By: Riku Voipio <riku.voipio@iki.fi>
> Fix this state of affairs by making the handling conditions the same as
> the call definition conditions.
> Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
> ---
> linux-user/syscall.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 226ee6c..8608171 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -6109,19 +6109,19 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
> ret = do_futex(arg1, arg2, arg3, arg4, arg5, arg6);
> break;
> #endif
> -#ifdef TARGET_NR_inotify_init
> +#if defined(TARGET_NR_inotify_init) && defined(__NR_inotify_init)
> case TARGET_NR_inotify_init:
> ret = get_errno(sys_inotify_init());
> break;
> #endif
> -#ifdef TARGET_NR_inotify_add_watch
> +#if defined(TARGET_NR_inotify_add_watch) && defined(__NR_inotify_add_watch)
> case TARGET_NR_inotify_add_watch:
> p = lock_user_string(arg2);
> ret = get_errno(sys_inotify_add_watch(arg1, path(p), arg3));
> unlock_user(p, arg2, 0);
> break;
> #endif
> -#ifdef TARGET_NR_inotify_rm_watch
> +#if defined(TARGET_NR_inotify_rm_watch) && defined(__NR_inotify_rm_watch)
> case TARGET_NR_inotify_rm_watch:
> ret = get_errno(sys_inotify_rm_watch(arg1, arg2));
> break;
> --
> 1.6.0.5
>
>
--
"rm -rf" only sounds scary if you don't have backups
next prev parent reply other threads:[~2009-03-30 21:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-28 20:49 [Qemu-devel] [PATCH] linux-user: fix problems with inotify syscalls Nathan Froyd
2009-03-30 21:15 ` Riku Voipio [this message]
2009-04-08 21:30 ` Aurelien Jarno
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=20090330211523.GA3633@kos.to \
--to=riku.voipio@iki.fi \
--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).