From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52685 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PbEVw-0002QI-SU for qemu-devel@nongnu.org; Fri, 07 Jan 2011 10:46:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PbEVv-0003VR-Rr for qemu-devel@nongnu.org; Fri, 07 Jan 2011 10:46:04 -0500 Received: from fmmailgate03.web.de ([217.72.192.234]:40585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PbEVv-0003VA-Gj for qemu-devel@nongnu.org; Fri, 07 Jan 2011 10:46:03 -0500 Message-ID: <4D273539.6060601@web.de> Date: Fri, 07 Jan 2011 16:46:01 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <20110107071815.26658.403.stgit@s20.home> <4D26D40D.4080600@web.de> <1294414794.3214.4.camel@x201> In-Reply-To: <1294414794.3214.4.camel@x201> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig94D2A738053E6BFE903401B8" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH] savevm: print migration failure to stderr rather than monitor List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: qemu-devel@nongnu.org, quintela@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig94D2A738053E6BFE903401B8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am 07.01.2011 16:39, Alex Williamson wrote: > On Fri, 2011-01-07 at 09:51 +0100, Jan Kiszka wrote: >> Am 07.01.2011 08:18, Alex Williamson wrote: >>> monitor_print only does anything for foreground commands, so we >>> don't ever see this error message in the case of a 'migrate -d'. >> >> Your change needlessly steals the error from the monitor console where= >> it belongs if migrate is used without -d. IIRC, mon is NULL in detache= d >> mode, so only print to stderr if there is no alternative. Otherwise >> stick with the monitor for interactive use. >=20 > Indeed, mon is NULL. That makes this an easy >=20 > if (mon) { > monitor_printf() > } else { > fprintf() > } >=20 > But I wonder if we should put the fprintf in the monitor_printf() path > so we're not just special casing this one user. Should all > monitor_printfs go to stderr if there's no monitor? Thanks, IIRC, there are valid cased where you want to suppress status updates of some subsystem by handing out a NULL monitor. If this error is critical (likely), then user error_report instead. It does the right thing. Jan --------------enig94D2A738053E6BFE903401B8 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.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk0nNTkACgkQitSsb3rl5xQ1ywCfQ3pnReG4Dyn7AS/99EzK8uWS 1dQAn1PwGdTbjDLCKXsD588tp4fPnlIz =OmR3 -----END PGP SIGNATURE----- --------------enig94D2A738053E6BFE903401B8--