Received: from eggs.gnu.org ([2001:4830:134:3::10]:35185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4X6d-0001eR-4H for qemu-devel@nongnu.org; Mon, 15 Jun 2015 12:19:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4X6c-0001yx-62 for qemu-devel@nongnu.org; Mon, 15 Jun 2015 12:19:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4X6b-0001ys-VP for qemu-devel@nongnu.org; Mon, 15 Jun 2015 12:19:26 -0400 Date: Mon, 15 Jun 2015 17:19:23 +0100 From: Stefan Hajnoczi Message-ID: <20150615161923.GJ12553@stefanha-thinkpad.redhat.com> References: <1434205258-1932-1-git-send-email-armbru@redhat.com> <1434205258-1932-2-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W/D3X8sky0X3AmG5" Content-Disposition: inline In-Reply-To: <1434205258-1932-2-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [PATCH 01/11] QemuOpts: Wean off qerror_report_err() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: mdroth@linux.vnet.ibm.com, kwolf@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com --W/D3X8sky0X3AmG5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 13, 2015 at 04:20:48PM +0200, Markus Armbruster wrote: > qerror_report_err() is a transitional interface to help with > converting existing monitor commands to QMP. It should not be used > elsewhere. >=20 > The only remaining user in qemu-option.c is qemu_opts_parse(). Is it > used in QMP context? If not, we can simply replace > qerror_report_err() by error_report_err(). >=20 > The uses in qemu-img.c, qemu-io.c, qemu-nbd.c and under tests/ are > clearly not in QMP context. >=20 > The uses in vl.c aren't either, because the only QMP command handlers > there are qmp_query_status() and qmp_query_machines(), and they don't > call it. >=20 > Remaining uses: >=20 > * drive_def(): Command line -drive and such, HMP drive_add and pci_add >=20 > * hmp_chardev_add(): HMP chardev-add >=20 > * monitor_parse_command(): HMP core >=20 > * tmp_config_parse(): Command line -tpmdev >=20 > * net_host_device_add(): HMP host_net_add >=20 > * net_client_parse(): Command line -net and -netdev >=20 > * qemu_global_option(): Command line -global >=20 > * vnc_parse_func(): Command line -display, -vnc, default display, HMP > change, QMP change. Bummer. >=20 > * qemu_pci_hot_add_nic(): HMP pci_add >=20 > * usb_net_init(): Command line -usbdevice, HMP usb_add >=20 > Propoagate errors through qemu_opts_parse(). Create a convenience > function qemu_opts_parse_noisily() that passes errors to > error_report_err(). Switch all non-QMP users outside tests to it. >=20 > That leaves vnc_parse_func(). Propagate errors through it. Since I'm > touching it anyway, rename it to vnc_parse(). >=20 > Signed-off-by: Markus Armbruster > --- > blockdev.c | 2 +- > hmp.c | 2 +- > hw/usb/dev-network.c | 2 +- > include/qemu/option.h | 5 ++- > include/ui/console.h | 2 +- > monitor.c | 2 +- > net/net.c | 5 ++- > qdev-monitor.c | 2 +- > qemu-img.c | 3 +- > qemu-io.c | 2 +- > qemu-nbd.c | 3 +- > qmp.c | 2 +- > tests/test-opts-visitor.c | 3 +- > tests/test-qemu-opts.c | 2 +- > tpm.c | 2 +- > ui/vnc.c | 4 +- > util/qemu-option.c | 25 ++++++++--- > vl.c | 103 +++++++++++++++++++++++++++++-----------= ------ > 18 files changed, 109 insertions(+), 62 deletions(-) Reviewed-by: Stefan Hajnoczi --W/D3X8sky0X3AmG5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVfvsLAAoJEJykq7OBq3PISysIAJkTa3KspnK1q103YjJ+KUTN hSR8g/rr9BoL9xnHrFBTgw1GLn+0sTqJc1P74smm/eklqDXDmkkEvv4g96XsVR+a s794URJMV5kmq04ZUxSAoqXma0n6Y6+u5MQ6NnFtxzPllNmepTAg5zORaU0/cejB ILa71KygOetiEskQ7+2jOIJ4xDaDMcTqJTjCcu4ga8w6fZ4QGkH/14AmiHHTu6XB YpPXVYiTCK949O69iebrMNOmd/P3gRdOh2wcMQJTo0iNg42lFB+xDuMXVmisfQkm sv/JzB+M4rgt93kgHxQVvDmoaGjSV8wBo16s0zuJYWiIzH2ZnAYGvxhvsMKtxq8= =LRaH -----END PGP SIGNATURE----- --W/D3X8sky0X3AmG5--