From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37587 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pb6aq-00055k-8Y for qemu-devel@nongnu.org; Fri, 07 Jan 2011 02:18:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pb6ap-0005cT-8Q for qemu-devel@nongnu.org; Fri, 07 Jan 2011 02:18:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pb6ap-0005cH-1g for qemu-devel@nongnu.org; Fri, 07 Jan 2011 02:18:35 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p077IVjx004186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 7 Jan 2011 02:18:31 -0500 From: Alex Williamson Date: Fri, 07 Jan 2011 00:18:29 -0700 Message-ID: <20110107071815.26658.403.stgit@s20.home> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [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: qemu-devel@nongnu.org Cc: alex.williamson@redhat.com, quintela@redhat.com monitor_print only does anything for foreground commands, so we don't ever see this error message in the case of a 'migrate -d'. It also doesn't do much good to print a monitor error message if the migration is being driven by something like libvirt. Both 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. Signed-off-by: Alex Williamson --- savevm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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, QEMUFile *f) r = vmstate_save(f, se); if (r < 0) { - monitor_printf(mon, "cannot migrate with device '%s'\n", se->idstr); + fprintf(stderr, "cannot migrate with device '%s'\n", se->idstr); return r; } }