From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YW3i8-0006sz-4E for qemu-devel@nongnu.org; Thu, 12 Mar 2015 10:03:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YW3i4-0005BO-JK for qemu-devel@nongnu.org; Thu, 12 Mar 2015 10:03:39 -0400 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:35388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YW3i4-0005B8-D6 for qemu-devel@nongnu.org; Thu, 12 Mar 2015 10:03:36 -0400 Received: by wibbs8 with SMTP id bs8so48026848wib.0 for ; Thu, 12 Mar 2015 07:03:35 -0700 (PDT) Date: Thu, 12 Mar 2015 14:03:33 +0000 From: Stefan Hajnoczi Message-ID: <20150312140333.GA948@stefanha-thinkpad.redhat.com> References: <1426149324-116508-1-git-send-email-kathy.wangting@huawei.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: <1426149324-116508-1-git-send-email-kathy.wangting@huawei.com> Subject: Re: [Qemu-devel] [PATCH v2] hmp: add info iothreads command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ting Wang Cc: pbonzini@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 12, 2015 at 04:35:24PM +0800, Ting Wang wrote: > +void hmp_info_iothreads(Monitor *mon, const QDict *qdict) > +{ > + IOThreadInfoList *head =3D NULL, *elem =3D NULL; > + > + head =3D qmp_query_iothreads(NULL); > + if (!head) { > + monitor_printf(mon, "No iothread has been added\n"); > + return; > + } > + > + elem =3D head; > + while (elem) { > + if (elem->value) { > + monitor_printf(mon, "%s: thread_id=3D%ld\n", elem->value->id= ,=20 > + 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. --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVAZy1AAoJEJykq7OBq3PIdk4H/0aaHM5w2G0lYqhgz97OgL4z VYiUamTHWCoGOcznHXilxhJa4ahzDDGyRK9d3YS9yQMk5JN7/PX47bEEGtC4ie+1 vyPLp4QNeRo5iELd5+dfVjaUiiOzXIjdoSXzGePTZrDJwIo+awubvOylbzap5yeF ouqVGy7imP3VtfPPV6bqMxjqUkmAsoLBoBt6UfmEj5nVRD984O749BOgs8qG7Dd1 gTS59mrjd+LG01V2kJnW/OY2CiUAwSOBQ/mO/rRGtHCfqYvSrG6cp9kyjybEBzCt JktlmyzVgFgKgdcaKeuWUqauacXjUHtZVUyNASivMIa+zsjZvhwl9BsZW0L0iM8= =j++h -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9--