[libvirt] [PATCH] qemu: monitor: Fix error message and comment when getting cpu info

Martin Kletzander mkletzan at redhat.com
Tue Mar 4 09:52:51 UTC 2014


On Tue, Mar 04, 2014 at 10:38:29AM +0100, Peter Krempa wrote:
> In qemuMonitorJSONExtractCPUInfo an error message hinted on missing
> character device data which is wrong.
>
> Also a comment states that only qemu-kvm tree includes the thread_id
> field. This is no longer true.
> ---

ACK

Martin

>  src/qemu/qemu_monitor_json.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
> index 5e825ac..9a5b812 100644
> --- a/src/qemu/qemu_monitor_json.c
> +++ b/src/qemu/qemu_monitor_json.c
> @@ -1220,13 +1220,13 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
>          int thread;
>          if (!entry) {
>              virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> -                           _("character device information was missing array element"));
> +                           _("cpu information was missing an array element"));
>              goto cleanup;
>          }
>
>          if (virJSONValueObjectGetNumberInt(entry, "thread_id", &thread) < 0) {
> -            /* Only qemu-kvm tree includs thread_id, so treat this as
> -               non-fatal, simply returning no data */
> +            /* Some older qemu versions don't report the thread_id,
> +             * so treat this as non-fatal, simply returning no data */
>              ret = 0;
>              goto cleanup;
>          }
> --
> 1.9.0
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140304/052a6e7f/attachment-0001.sig>


More information about the libvir-list mailing list