From: Aurelien Jarno <aurelien@aurel32.net>
To: Riku Voipio <riku.voipio@iki.fi>
Cc: Riku Voipio <riku.voipio@nokia.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/4] Add inotify_init1 syscall support
Date: Fri, 26 Mar 2010 23:14:06 +0100 [thread overview]
Message-ID: <20100326221406.GD15194@volta.aurel32.net> (raw)
In-Reply-To: <47b7d8a4c69443f7902c4b413143cb8de67c1d6e.1269616764.git.riku.voipio@nokia.com>
On Fri, Mar 26, 2010 at 03:25:11PM +0000, Riku Voipio wrote:
> From: Riku Voipio <riku.voipio@nokia.com>
>
> New syscall which gets actively used when you have a
> fresh kernel.
>
> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
Thanks, applied.
> ---
> configure | 18 ++++++++++++++++++
> linux-user/syscall.c | 14 ++++++++++++++
> 2 files changed, 32 insertions(+), 0 deletions(-)
>
> diff --git a/configure b/configure
> index 6bc40a3..f9e08f6 100755
> --- a/configure
> +++ b/configure
> @@ -1629,6 +1629,21 @@ if compile_prog "" "" ; then
> inotify=yes
> fi
>
> +inotify1=no
> +cat > $TMPC << EOF
> +#include <sys/inotify.h>
> +
> +int
> +main(void)
> +{
> + /* try to start inotify */
> + return inotify_init1(0);
> +}
> +EOF
> +if compile_prog "" "" ; then
> + inotify1=yes
> +fi
> +
> # check if utimensat and futimens are supported
> utimens=no
> cat > $TMPC << EOF
> @@ -2136,6 +2151,9 @@ fi
> if test "$inotify" = "yes" ; then
> echo "CONFIG_INOTIFY=y" >> $config_host_mak
> fi
> +if test "$inotify1" = "yes" ; then
> + echo "CONFIG_INOTIFY1=y" >> $config_host_mak
> +fi
> if test "$byteswap_h" = "yes" ; then
> echo "CONFIG_BYTESWAP_H=y" >> $config_host_mak
> fi
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 845bb60..4b2a765 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -506,9 +506,18 @@ static int sys_inotify_rm_watch(int fd, int32_t wd)
> return (inotify_rm_watch(fd, wd));
> }
> #endif
> +#ifdef CONFIG_INOTIFY1
> +#if defined(TARGET_NR_inotify_init1) && defined(__NR_inotify_init1)
> +static int sys_inotify_init1(int flags)
> +{
> + return (inotify_init1(flags));
> +}
> +#endif
> +#endif
> #else
> /* Userspace can usually survive runtime without inotify */
> #undef TARGET_NR_inotify_init
> +#undef TARGET_NR_inotify_init1
> #undef TARGET_NR_inotify_add_watch
> #undef TARGET_NR_inotify_rm_watch
> #endif /* CONFIG_INOTIFY */
> @@ -7174,6 +7183,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
> ret = get_errno(sys_inotify_init());
> break;
> #endif
> +#if defined(TARGET_NR_inotify_init1) && defined(__NR_inotify_init1)
> + case TARGET_NR_inotify_init1:
> + ret = get_errno(sys_inotify_init1(arg1));
> + break;
> +#endif
> #if defined(TARGET_NR_inotify_add_watch) && defined(__NR_inotify_add_watch)
> case TARGET_NR_inotify_add_watch:
> p = lock_user_string(arg2);
> --
> 1.6.5
>
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2010-03-26 22:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-26 15:25 [Qemu-devel] [PATCH 0/4] linux-user patches for upstream Riku Voipio
2010-03-26 15:25 ` [Qemu-devel] [PATCH 1/4] linux-user: add pselect syscall Riku Voipio
2010-03-26 22:15 ` Aurelien Jarno
2010-03-26 23:05 ` Paul Brook
2010-03-28 18:49 ` Jamie Lokier
2010-03-26 15:25 ` [Qemu-devel] [PATCH 2/4] linux-user: Add the syscall id for pselect6 on ARM Riku Voipio
2010-03-26 22:13 ` Aurelien Jarno
2010-03-26 15:25 ` [Qemu-devel] [PATCH 3/4] Add inotify_init1 syscall support Riku Voipio
2010-03-26 22:14 ` Aurelien Jarno [this message]
2010-03-26 15:25 ` [Qemu-devel] [PATCH 4/4] fix 0 sized write syscall Riku Voipio
2010-03-26 16:07 ` Richard Henderson
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=20100326221406.GD15194@volta.aurel32.net \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=riku.voipio@nokia.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.