From patchwork Fri Jan 7 07:18:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 77855 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DFBB3B70A9 for ; Fri, 7 Jan 2011 18:19:53 +1100 (EST) Received: from localhost ([127.0.0.1]:49350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pb6bx-00057R-TP for incoming@patchwork.ozlabs.org; Fri, 07 Jan 2011 02:19:45 -0500 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 Received: from s20.home (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p077ITR5023646; Fri, 7 Jan 2011 02:18:30 -0500 From: Alex Williamson To: qemu-devel@nongnu.org Date: Fri, 07 Jan 2011 00:18:29 -0700 Message-ID: <20110107071815.26658.403.stgit@s20.home> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: alex.williamson@redhat.com, quintela@redhat.com Subject: [Qemu-devel] [PATCH] savevm: print migration failure to stderr rather than monitor X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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; } }