From: Riku Voipio <riku.voipio@iki.fi>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] add inotify syscalls
Date: Fri, 19 Sep 2008 14:37:45 +0300 [thread overview]
Message-ID: <20080919113745.GC9668@kos.to> (raw)
In-Reply-To: <20080919080805.GC18614@localhost.localdomain>
On Fri, Sep 19, 2008 at 11:08:07AM +0300, Kirill A. Shutemov wrote:
> On Wed, Sep 17, 2008 at 10:45:50PM +0300, Riku Voipio wrote:
> > Inotify syscall implementation lifted from scratchbox.
> >
> > Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
> > --
> > "rm -rf" only sounds scary if you don't have backups
>
> > Index: trunk/linux-user/syscall.c
> > ===================================================================
> > --- trunk.orig/linux-user/syscall.c 2008-09-17 22:08:51.000000000 +0300
> > +++ trunk/linux-user/syscall.c 2008-09-17 22:12:04.000000000 +0300
> > @@ -29,6 +29,7 @@
> > #include <time.h>
> > #include <limits.h>
> > #include <sys/types.h>
> > +#include <sys/inotify.h>
> > #include <sys/ipc.h>
> > #include <sys/msg.h>
> > #include <sys/wait.h>
> > @@ -5821,7 +5822,23 @@
> > ret = do_futex(arg1, arg2, arg3, arg4, arg5, arg6);
> > break;
> > #endif
> > -
> > +#ifdef TARGET_NR_inotify_init
> > + case TARGET_NR_inotify_init:
> > + ret = get_errno(inotify_init());
> > + break;
> > +#endif
> > +#ifdef TARGET_NR_inotify_add_watch
> > + case TARGET_NR_inotify_add_watch:
> > + p = lock_user_string(arg2);
> > + ret = get_errno(inotify_add_watch(arg1, path(p), arg3));
> > + unlock_user(p, arg2, 0);
> > + break;
> > +#endif
> > +#ifdef TARGET_NR_inotify_rm_watch
> > + case TARGET_NR_inotify_rm_watch:
> > + ret = get_errno(inotify_rm_watch(arg1, arg2));
> > + break;
> > +#endif
> > default:
> > unimplemented:
> > gemu_log("qemu: Unsupported syscall: %d\n", num);
>
>
> This syscalls like *at introduced in glibc 2.4. So you should use
> _syscall* macros for backward compatible.
Right, will fix in a moment
--
"rm -rf" only sounds scary if you don't have backups
prev parent reply other threads:[~2008-09-19 11:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-17 19:45 [Qemu-devel] [PATCH] add inotify syscalls Riku Voipio
2008-09-19 8:08 ` Kirill A. Shutemov
2008-09-19 11:37 ` Riku Voipio [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=20080919113745.GC9668@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).