From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWESj-000632-0J for qemu-devel@nongnu.org; Thu, 12 Mar 2015 21:32:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWESb-00021R-MF for qemu-devel@nongnu.org; Thu, 12 Mar 2015 21:32:28 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:53099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWESb-00020b-0e for qemu-devel@nongnu.org; Thu, 12 Mar 2015 21:32:21 -0400 Message-ID: <55023E14.209@huawei.com> Date: Fri, 13 Mar 2015 09:32:04 +0800 From: Ting Wang MIME-Version: 1.0 References: <1426149324-116508-1-git-send-email-kathy.wangting@huawei.com> <20150312140333.GA948@stefanha-thinkpad.redhat.com> In-Reply-To: <20150312140333.GA948@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] hmp: add info iothreads command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: pbonzini@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On 2015-3-12 22:03, Stefan Hajnoczi wrote: > 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. > OK, I will fix it. Thank you very much. Ting