From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44897 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pb82j-00054Q-36 for qemu-devel@nongnu.org; Fri, 07 Jan 2011 03:51:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pb82i-0006oA-7B for qemu-devel@nongnu.org; Fri, 07 Jan 2011 03:51:28 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:56597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pb82h-0006nu-RS for qemu-devel@nongnu.org; Fri, 07 Jan 2011 03:51:28 -0500 Message-ID: <4D26D40D.4080600@web.de> Date: Fri, 07 Jan 2011 09:51:25 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <20110107071815.26658.403.stgit@s20.home> In-Reply-To: <20110107071815.26658.403.stgit@s20.home> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigADFC824F487C2A8AC47D8740" 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) --------------enigADFC824F487C2A8AC47D8740 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 detached mode, so only print to stderr if there is no alternative. Otherwise stick with the monitor for interactive use. > It also doesn't do much good to print a monitor error message if > the migration is being driven by something like libvirt. Both There is not only libvirt. Please don't destroy HMP "experience". Jan > of these seem to be the typical usage scenarios, so we might as > well print this error to stderr so it can at least be found in > the log messages. >=20 > Signed-off-by: Alex Williamson > --- >=20 > savevm.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) >=20 > diff --git a/savevm.c b/savevm.c > index 90aa237..c6b9b01 100644 > --- a/savevm.c > +++ b/savevm.c > @@ -1543,7 +1543,7 @@ int qemu_savevm_state_complete(Monitor *mon, QEMU= File *f) > =20 > r =3D vmstate_save(f, se); > if (r < 0) { > - monitor_printf(mon, "cannot migrate with device '%s'\n", s= e->idstr); > + fprintf(stderr, "cannot migrate with device '%s'\n", se->i= dstr); > return r; > } > } >=20 >=20 >=20 --------------enigADFC824F487C2A8AC47D8740 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/ iEYEARECAAYFAk0m1A0ACgkQitSsb3rl5xTnXwCg5kHdk0wQcq2s9r6Gj4VBpLQw hBwAoO0OgHSttOfBHmh5lzghwlusWjBh =2GDE -----END PGP SIGNATURE----- --------------enigADFC824F487C2A8AC47D8740--