From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kg2yM-0003N3-9N for qemu-devel@nongnu.org; Wed, 17 Sep 2008 15:45:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kg2yL-0003M8-MG for qemu-devel@nongnu.org; Wed, 17 Sep 2008 15:45:57 -0400 Received: from [199.232.76.173] (port=58445 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kg2yL-0003M1-GI for qemu-devel@nongnu.org; Wed, 17 Sep 2008 15:45:57 -0400 Received: from [84.20.150.76] (port=43420 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 1Kg2yL-000079-76 for qemu-devel@nongnu.org; Wed, 17 Sep 2008 15:45:57 -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 E2B7A3274001 for ; Wed, 17 Sep 2008 22:45:50 +0300 (EEST) Date: Wed, 17 Sep 2008 22:45:50 +0300 From: Riku Voipio Message-ID: <20080917194550.GD21187@kos.to> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HB4mHL4PVvkpZAgW" Content-Disposition: inline Subject: [Qemu-devel] [PATCH] add inotify syscalls 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 --HB4mHL4PVvkpZAgW Content-Type: multipart/mixed; boundary="H4SyuGOnfnj3aJqJ" Content-Disposition: inline --H4SyuGOnfnj3aJqJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Inotify syscall implementation lifted from scratchbox. Signed-off-by: Riku Voipio --=20 "rm -rf" only sounds scary if you don't have backups --H4SyuGOnfnj3aJqJ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="97_inotify.patch" 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); --H4SyuGOnfnj3aJqJ-- --HB4mHL4PVvkpZAgW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFI0V5uibPvMsrqrwMRAsRUAJ0eyXulaVpDnKnkB61T6PmcMdbZGwCgmaHL 7G27W+sWGkUWqPyFMkEn0g8= =cUAm -----END PGP SIGNATURE----- --HB4mHL4PVvkpZAgW--