qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] bad error message in drive-mirror
@ 2014-08-25 23:26 Eric Blake
  2014-08-27 13:30 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Blake @ 2014-08-25 23:26 UTC (permalink / raw)
  To: qemu-devel@nongnu.org, Markus Armbruster, Luiz Capitulino

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

I just noticed today that passing "granularity":1 to QMP drive-mirror
results in this confusing error message:

Invalid parameter 'drive-virtio-disk0'

because the code mistakenly did
        error_set(errp, QERR_INVALID_PARAMETER, device);
instead of the correct
        error_set(errp, QERR_INVALID_PARAMETER, "granularity");

I ran out of time to patch it today, and at any rate, whoever writes the
patch should probably audit for other bad uses of
error_set(QERR_INVALID_PARAMETER).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] bad error message in drive-mirror
  2014-08-25 23:26 [Qemu-devel] bad error message in drive-mirror Eric Blake
@ 2014-08-27 13:30 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2014-08-27 13:30 UTC (permalink / raw)
  To: Eric Blake; +Cc: Luiz Capitulino, qemu-devel@nongnu.org, Markus Armbruster

[-- Attachment #1: Type: text/plain, Size: 659 bytes --]

On Mon, Aug 25, 2014 at 05:26:31PM -0600, Eric Blake wrote:
> I just noticed today that passing "granularity":1 to QMP drive-mirror
> results in this confusing error message:
> 
> Invalid parameter 'drive-virtio-disk0'
> 
> because the code mistakenly did
>         error_set(errp, QERR_INVALID_PARAMETER, device);
> instead of the correct
>         error_set(errp, QERR_INVALID_PARAMETER, "granularity");
> 
> I ran out of time to patch it today, and at any rate, whoever writes the
> patch should probably audit for other bad uses of
> error_set(QERR_INVALID_PARAMETER).

I have sent a patch to fix this.  Thanks for reporting it.

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-27 13:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-25 23:26 [Qemu-devel] bad error message in drive-mirror Eric Blake
2014-08-27 13:30 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).