From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9IZk-00068u-Bp for qemu-devel@nongnu.org; Fri, 31 Jan 2014 13:12:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9IZf-0006zj-Dn for qemu-devel@nongnu.org; Fri, 31 Jan 2014 13:12:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9IZf-0006zS-5M for qemu-devel@nongnu.org; Fri, 31 Jan 2014 13:12:19 -0500 Message-ID: <52EBE77E.2080507@redhat.com> Date: Fri, 31 Jan 2014 11:12:14 -0700 From: Eric Blake MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6etfccrMv1RL5TQaG7mNSuLH2Qxe8GdWW" Subject: Re: [Qemu-devel] [PATCH v2] qga: Don't require 'time' argument in guest-set-time command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michal Privoznik , qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6etfccrMv1RL5TQaG7mNSuLH2Qxe8GdWW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 01/31/2014 03:29 AM, Michal Privoznik wrote: > As the description to the guest-set-time states, the command is > there to ease time synchronization after resume. If guest was > suspended for longer period of time, its system time can go off > so badly, that even NTP refuses to set it. That's why the command > was invented: to give users chance to set the time (not > necessarily 100% correct). However, there's is no real need for > us to require users to pass an arbitrary time. Especially if we > can read the correct value from RTC (boiling down to reading > host's time). Hence this commit enables logic: >=20 > guest-set-time() =3D=3D guest-set-time($now_from_rtc) >=20 > Signed-off-by: Michal Privoznik > --- > diff to v1: > -Fix checkpatch.pl warnings=20 >=20 > qga/commands-posix.c | 41 +++++++++++++++++++++++++---------------- > qga/commands-win32.c | 34 +++++++++++++++++++++++----------- > qga/qapi-schema.json | 9 +++++---- > 3 files changed, 53 insertions(+), 31 deletions(-) Reviewed-by: Eric Blake Conversion from mandatory to optional is backward-compatible. I'm not sure if it worth some sort of annotation when it was made optional; maybe= : # @time: (#optional since 2.0) time of nanoseconds, relative to the # Epoch of 1970-01-01 in UTC. we don't have much precedent for that sort of change, but documenting it may make it more obvious to a user that older agents require an argument.= --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --6etfccrMv1RL5TQaG7mNSuLH2Qxe8GdWW 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJS6+d+AAoJEKeha0olJ0NqeZYH/A8CvxLRVvhLn9e1CJyWS2La RtL3qj0z3niX/gAUtgQkJPBBJIUvIHC4qX2ois+XR/uqLOaZhZC1ncNeptFwE1yv qxflKOdNTrulv04Ec9KhWkoJ+0+G3zcYhyd3bukAKwZO0ocU47d1sUBjkFtPSZC+ tgPUF023H6VgQduH+UoLjy2uFzcwfTQpTlsqfFbY/xzUEGooUkgBpL96ViN6/n0f UxYUDxpKVpg2hqArHfxnQLduQ9w3D4t79LyD9eYUY5b8uhw4yMABCregP1eTXYC1 wSQngDKLhnomvHiq2z2rdQXb6w1YP7ahdWpJQcormWH3fxzm16aDLoIjVW1XN5c= =IMQF -----END PGP SIGNATURE----- --6etfccrMv1RL5TQaG7mNSuLH2Qxe8GdWW--