From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kgb1T-00011z-J9 for qemu-devel@nongnu.org; Fri, 19 Sep 2008 04:07:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kgb1S-00011n-VH for qemu-devel@nongnu.org; Fri, 19 Sep 2008 04:07:27 -0400 Received: from [199.232.76.173] (port=38854 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kgb1R-00011Z-CC for qemu-devel@nongnu.org; Fri, 19 Sep 2008 04:07:25 -0400 Received: from mx20.gnu.org ([199.232.41.8]:29500) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kgb1R-00051i-25 for qemu-devel@nongnu.org; Fri, 19 Sep 2008 04:07:25 -0400 Received: from ug-out-1314.google.com ([66.249.92.175]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kgb1Q-0006ud-82 for qemu-devel@nongnu.org; Fri, 19 Sep 2008 04:07:24 -0400 Received: by ug-out-1314.google.com with SMTP id j3so917412ugf.36 for ; Fri, 19 Sep 2008 01:07:23 -0700 (PDT) Date: Fri, 19 Sep 2008 11:08:07 +0300 From: "Kirill A. Shutemov" Subject: Re: [Qemu-devel] [PATCH] add inotify syscalls Message-ID: <20080919080805.GC18614@localhost.localdomain> References: <20080917194550.GD21187@kos.to> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eHhjakXzOLJAF9wJ" Content-Disposition: inline In-Reply-To: <20080917194550.GD21187@kos.to> 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 --eHhjakXzOLJAF9wJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 17, 2008 at 10:45:50PM +0300, Riku Voipio wrote: > Inotify syscall implementation lifted from scratchbox. >=20 > Signed-off-by: Riku Voipio > --=20 > "rm -rf" only sounds scary if you don't have backups > Index: trunk/linux-user/syscall.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- 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 =3D do_futex(arg1, arg2, arg3, arg4, arg5, arg6); > break; > #endif > - > +#ifdef TARGET_NR_inotify_init > + case TARGET_NR_inotify_init: > + ret =3D get_errno(inotify_init()); > + break; > +#endif > +#ifdef TARGET_NR_inotify_add_watch > + case TARGET_NR_inotify_add_watch: > + p =3D lock_user_string(arg2); > + ret =3D 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 =3D 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. --=20 Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.com/ --eHhjakXzOLJAF9wJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkjTXeUACgkQbWYnhzC5v6ozbQCfR7xNqbM5FEAO+96uzOAH/AAv 5bYAmgNHF7oydZJouCbCdzp8yuV7ONjz =ZaOV -----END PGP SIGNATURE----- --eHhjakXzOLJAF9wJ--