From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b39bC-0003h5-E7 for qemu-devel@nongnu.org; Wed, 18 May 2016 18:05:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b39bB-00068G-D4 for qemu-devel@nongnu.org; Wed, 18 May 2016 18:05:50 -0400 References: <1463608420-26837-1-git-send-email-jsnow@redhat.com> <1463608420-26837-2-git-send-email-jsnow@redhat.com> From: Eric Blake Message-ID: <573CE735.4020008@redhat.com> Date: Wed, 18 May 2016 16:05:41 -0600 MIME-Version: 1.0 In-Reply-To: <1463608420-26837-2-git-send-email-jsnow@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pHfRicwXd80GHOupAQBOnWuDpJlSeHCUs" Subject: Re: [Qemu-devel] [PATCH v2 1/1] block: clarify error message for qmp-eject List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , qemu-block@nongnu.org Cc: mreitz@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pHfRicwXd80GHOupAQBOnWuDpJlSeHCUs Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/18/2016 03:53 PM, John Snow wrote: > If you use HMP's eject but the CDROM tray is locked, you may get a > confusing error message informing you that the "tray isn't open." >=20 > As this is the point of eject, we can do a little better and help > clarify that the tray was locked and that it (might) open up later, > so try again. >=20 > It's not ideal, but it makes the semantics of the (legacy) eject > command more understandable to end users when they try to use it. >=20 > Signed-off-by: John Snow > --- > blockdev.c | 51 ++++++++++++++++++++++++++++++++++++++++----------- > 1 file changed, 40 insertions(+), 11 deletions(-) Still somewhat complicated, but this time the complication is documented, and the clean <0, 0, and >0 semantics make parsing the return value a bit easier to understand. And I don't see any cleaner way to do it. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --pHfRicwXd80GHOupAQBOnWuDpJlSeHCUs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXPOc1AAoJEKeha0olJ0Nq7t8H/jj1aqM4OsOSogDRjdrU1Tt4 Fiu8HRJ+zXcqUK08UswRBKj8xzBMhcDCstT+RUv9Mm6x636YCMJgyHV861Mnd6gT S3uoMpfuqJKFc9/Z5GhLIc2ZKGGyjJW0M5/gijVq9bHATiB4tRY97KGGYJE/VE/K CkV+P6L9KS2SahAOrVhuAINCpl56StDcYXeO87dsCSX23rHPg2ACprlwDqroMb5d Qoq7G2LAlsCisaTbE7xP1efD7o3kvaOya/N6MA3IQjv3GothEk9cMiQit4y3QRIi A/FTHiEtCOT+OF7beUKaT7iuRr739FY3a6/yEYOx2uMHAgRWN7sqGqc4sk6/lnQ= =22H4 -----END PGP SIGNATURE----- --pHfRicwXd80GHOupAQBOnWuDpJlSeHCUs--