From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqTWO-0007jj-RP for qemu-devel@nongnu.org; Wed, 23 Sep 2009 11:12:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqTWJ-0007hZ-Cf for qemu-devel@nongnu.org; Wed, 23 Sep 2009 11:12:43 -0400 Received: from [199.232.76.173] (port=33513 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqTWJ-0007hW-7O for qemu-devel@nongnu.org; Wed, 23 Sep 2009 11:12:39 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:56676) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MqTWI-0004wO-Jj for qemu-devel@nongnu.org; Wed, 23 Sep 2009 11:12:39 -0400 Message-ID: <4ABA3ADA.9070404@web.de> Date: Wed, 23 Sep 2009 17:12:26 +0200 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Drop config_error(), use qemu_error() instead References: <87hbv96q4d.fsf@pike.pond.sub.org> <1253619422.6528.5.camel@blaa> In-Reply-To: <1253619422.6528.5.camel@blaa> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig17C8A4B9B83860E54F8AD66E" Sender: jan.kiszka@web.de List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark McLoughlin Cc: Markus Armbruster , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig17C8A4B9B83860E54F8AD66E Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Mark McLoughlin wrote: > On Sat, 2009-09-12 at 01:03 +0200, Markus Armbruster wrote: >=20 >> There's one user-visible difference: config_error() prepended "qemu: "= >> to a message bound for stderr. qemu_error() doesn't, which means the >> prefix goes away with this commit. > ... >> --- >> net.c | 128 ++++++++++++++++++++++++++++----------------------------= --------- >> 1 files changed, 55 insertions(+), 73 deletions(-) >> >> diff --git a/net.c b/net.c >> index 4510694..e88919b 100644 >> --- a/net.c >> +++ b/net.c >> @@ -641,21 +641,6 @@ qemu_sendv_packet(VLANClientState *vc, const stru= ct iovec *iov, int iovcnt) >> return qemu_sendv_packet_async(vc, iov, iovcnt, NULL); >> } >> =20 >> -static void config_error(Monitor *mon, const char *fmt, ...) >> -{ >> - va_list ap; >> - >> - va_start(ap, fmt); >> - if (mon) { >> - monitor_vprintf(mon, fmt, ap); >> - } else { >> - fprintf(stderr, "qemu: "); >> - vfprintf(stderr, fmt, ap); >> - exit(1); >=20 > There's another difference, actually - qemu_error() doesn't abort when > printing an error to stderr >=20 > I'm fine with that, but could you check all callers to make sure that's= > sane? Valid remark. I think the effect will be that we continue with parameter evaluation or even VM startup even though parts of the setup failed / was skipped. May produce funny subsequent errors that will only confuse the user. Jan --------------enig17C8A4B9B83860E54F8AD66E 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.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkq6OtoACgkQitSsb3rl5xRHGwCg3NOQ5wd+Bq2hJ2HsHym/dg+M vA0An0hqkMOgXr3Txk9pP07LojjhpLjm =SFY5 -----END PGP SIGNATURE----- --------------enig17C8A4B9B83860E54F8AD66E--