[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/1] block: clarify error message for qmp-eje
Re: [Qemu-devel] [PATCH v2 1/1] block: clarify error message for qmp-eject
Wed, 18 May 2016 16:05:41 -0600
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
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."
> 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.
> 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.
> Signed-off-by: John Snow <address@hidden>
> 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 <address@hidden>
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Description: OpenPGP digital signature