From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KgeJ6-0000wF-MJ for qemu-devel@nongnu.org; Fri, 19 Sep 2008 07:37:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KgeJ6-0000vx-0K for qemu-devel@nongnu.org; Fri, 19 Sep 2008 07:37:52 -0400 Received: from [199.232.76.173] (port=58052 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgeJ5-0000vr-R1 for qemu-devel@nongnu.org; Fri, 19 Sep 2008 07:37:51 -0400 Received: from [84.20.150.76] (port=56544 helo=narury.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KgeJ5-0004rz-IQ for qemu-devel@nongnu.org; Fri, 19 Sep 2008 07:37:51 -0400 Received: from kos.to (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by narury.org (Postfix) with ESMTP id 19BD73274001 for ; Fri, 19 Sep 2008 14:37:46 +0300 (EEST) Date: Fri, 19 Sep 2008 14:37:45 +0300 From: Riku Voipio Subject: Re: [Qemu-devel] [PATCH] add inotify syscalls Message-ID: <20080919113745.GC9668@kos.to> References: <20080917194550.GD21187@kos.to> <20080919080805.GC18614@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080919080805.GC18614@localhost.localdomain> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 > > -- > > "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 > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -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