From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8Yl1-0000qm-7t for qemu-devel@nongnu.org; Fri, 16 Mar 2012 11:08:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8Ykd-0001AH-2e for qemu-devel@nongnu.org; Fri, 16 Mar 2012 11:07:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8Ykc-00019y-Qe for qemu-devel@nongnu.org; Fri, 16 Mar 2012 11:07:30 -0400 Message-ID: <4F63572E.1050700@redhat.com> Date: Fri, 16 Mar 2012 09:07:26 -0600 From: Eric Blake MIME-Version: 1.0 References: <4F63366E.8090902@redhat.com> In-Reply-To: <4F63366E.8090902@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigA785043CD4F505549F184976" Subject: Re: [Qemu-devel] Guest-sync-delimited and sentinel issue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michal Privoznik Cc: QEMU Developers , Michael Roth This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA785043CD4F505549F184976 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03/16/2012 06:47 AM, Michal Privoznik wrote: > Hi guys, >=20 > I was just implementing support for guest-sync-delimited into libvirt. = My intent is to issue this command prior any other command to determine i= f GA is available or not. The big advantage is - it doesn't change the st= ate of the guest so from libvirt POV it's harmless. The other big advanta= ge is this sentinel byte 0xFF which is supposed to flush all unprocessed = (and possibly stale) data from previous unsuccessful tries. >=20 > As written in documentation, this command will output sentinel byte to = the guest agent socket. This works perfectly. However, it is advised in t= he very same documentation to prepend this command with the sentinel as w= ell allowing GA parser flush. But this doesn't work for me completely. Al= l I can get is: >=20 > $ echo -e "\xFF{\"execute\":\"guest-sync-delimited\", \"arguments\":{\"= id\":1234}}" | nc -U /tmp/ga.sock | hexdump -C side note - echo -e is non-portable; I would have written this as: printf '\xff{"execute":"guest-sync-delimited", "arguments":{"id":1234}}' --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigA785043CD4F505549F184976 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPY1cuAAoJEKeha0olJ0Nqo/YH/AoHgvyRwngP5Aa7fQNlKyTD q1UgxXD9u2QpZhtJmdJWPLkvKM0pnkHXa6VQyYfniNzXJCph1i2To07BuHu0XzZy bwCFSvt+31jtcr1Cmak8WF/270vHKY4bwL8AZJuVbsQlhuo424ovpE0wKnkvMIqR nfxFDZCbHgDITmTEmQrZHw8opzT0b1gCG0f7UJ9+/ebSE/at2YWzD6ZguugdDf4o zss9gOW7tX/9qsztQ2C4e+e/ljtFwO4KxMuqX5J5ANnHXPPrLAkAM66CtKdbXBkA W/kzUm76gq9uca6lddHOlIbE41wZmppQYaupJR6+efTTNvvVBeDvQRG02sjJIu0= =tG2L -----END PGP SIGNATURE----- --------------enigA785043CD4F505549F184976--