qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] hmp: add info iothreads command


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2] hmp: add info iothreads command
Date: Thu, 12 Mar 2015 14:03:33 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, Mar 12, 2015 at 04:35:24PM +0800, Ting Wang wrote:
> +void hmp_info_iothreads(Monitor *mon, const QDict *qdict)
> +{
> +    IOThreadInfoList *head = NULL, *elem = NULL;
> +
> +    head = qmp_query_iothreads(NULL);
> +    if (!head) {
> +        monitor_printf(mon, "No iothread has been added\n");
> +        return;
> +    }
> +
> +    elem = head;
> +    while (elem) {
> +        if (elem->value) {
> +            monitor_printf(mon, "%s: thread_id=%ld\n", elem->value->id, 
> +                    elem->value->thread_id);

%ld does not work on 32-bit hosts or 64-bit Windows hosts where long is
32-bit.

Please use the PRId64 format specifier macro for the int64_t thread_id.

Attachment: pgpgEYSALkl6M.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]