From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z23HH-0001oT-2V for qemu-devel@nongnu.org; Mon, 08 Jun 2015 16:04:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z23HD-0006kA-Jr for qemu-devel@nongnu.org; Mon, 08 Jun 2015 16:04:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z23HD-0006jP-Dr for qemu-devel@nongnu.org; Mon, 08 Jun 2015 16:04:07 -0400 Message-ID: <5575F534.5020004@redhat.com> Date: Mon, 08 Jun 2015 14:04:04 -0600 From: Eric Blake MIME-Version: 1.0 References: <1433789877-6950-1-git-send-email-armbru@redhat.com> <1433789877-6950-8-git-send-email-armbru@redhat.com> In-Reply-To: <1433789877-6950-8-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NwS5QrLWWE66BC0oUkhuVXI9ciGt2RMtg" Subject: Re: [Qemu-devel] [PATCH 7/7] qdev-monitor: Propagate errors through qdev_device_add() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, afaerber@suse.de, kraxel@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NwS5QrLWWE66BC0oUkhuVXI9ciGt2RMtg Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/08/2015 12:57 PM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > include/monitor/qdev.h | 2 +- > qdev-monitor.c | 36 +++++++++++++++--------------------- > vl.c | 7 +++++-- > 3 files changed, 21 insertions(+), 24 deletions(-) >=20 > if (!object_dynamic_cast(OBJECT(bus), dc->bus_type)) { > - qerror_report(ERROR_CLASS_GENERIC_ERROR, > - "Device '%s' can't go on a %s bus", > - driver, object_get_typename(OBJECT(bus))); > + error_setg(errp, "Device '%s' can't go on a %s bus", > + driver, object_get_typename(OBJECT(bus))); Pre-existing - "a '%s' bus" or "an %s bus" might look a bit nicer than "a %s bus" for some bus names (depends on the initial sound during pronunciation). Certainly a nightmare for translation rules to other languages that don't follow English rules on indefinite article usage. Maybe some word-smithing can avoid the indefinite article altogether? But not something I care about enough to hold up the series. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --NwS5QrLWWE66BC0oUkhuVXI9ciGt2RMtg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVdfU0AAoJEKeha0olJ0Nq0HgIAIHfxRagacfsIv5KKUE5jbEQ XaY9Oc09LdTVMN3PRQl7aP0cNRQ4c0K/m56aVwcpq8QbzQ6q46EnjOaJ6mfhF59L iS/zYiLc+qKkDJQxcPitpIuAyPFcNrHrFSK2TP/YWqfmnXoiANB0BGXTn7pzmUBx Izz/L8FPbJESxo9KGeqeUA2jqN5bEMQEy7mshmgeu8EYrNtaP0VdgczNXfssKwbc 1iNplBwzBRx6XTHgNeXH2wcUFtPqQUjkqizYb1byGFSySGQoBIqEZmadBW/zo2X9 kxDfOpPMw31eAWlDF38Hm+TZsHillWK0VLtaiFa/2+n+Lnu7YxLy8Cz3iENN7O4= =NbNb -----END PGP SIGNATURE----- --NwS5QrLWWE66BC0oUkhuVXI9ciGt2RMtg--