From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nusbv-0005Aq-Bj for qemu-devel@nongnu.org; Thu, 25 Mar 2010 15:20:55 -0400 Received: from [140.186.70.92] (port=33884 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nusbu-0005AX-C2 for qemu-devel@nongnu.org; Thu, 25 Mar 2010 15:20:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nusbs-0006hT-Mn for qemu-devel@nongnu.org; Thu, 25 Mar 2010 15:20:54 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:43832) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nusbs-0006hH-KH for qemu-devel@nongnu.org; Thu, 25 Mar 2010 15:20:52 -0400 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by e7.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id o2PJCB2d007907 for ; Thu, 25 Mar 2010 15:12:11 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o2PJKnSG147308 for ; Thu, 25 Mar 2010 15:20:49 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o2PJKnL5005756 for ; Thu, 25 Mar 2010 15:20:49 -0400 Date: Thu, 25 Mar 2010 14:20:43 -0500 From: Ryan Harper Subject: Re: [Qemu-devel] [PATCH] Add qerror message if the 'change' target filename can't be opened Message-ID: <20100325192043.GU27260@us.ibm.com> References: <20100325143258.GS27260@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Ryan Harper , qemu-devel@nongnu.org * Markus Armbruster [2010-03-25 11:41]: > Ryan Harper writes: > > > Currently when using the change command to switch the file in the cd drive > > the command doesn't complain if the file doesn't exit or can't be opened > > and the drive keeps the existing image. This patch adds a qerror_report > > call to print a message out indicating the failure. This error message > > can be used to catch failures. > > > [...] > > > > Signed-off-by: Ryan Harper > > --- > > monitor.c | 1 + > > 1 files changed, 1 insertions(+), 0 deletions(-) > > > > diff --git a/monitor.c b/monitor.c > > index 0448a70..196c7a6 100644 > > --- a/monitor.c > > +++ b/monitor.c > > @@ -1099,6 +1099,7 @@ static int do_change_block(Monitor *mon, const char *device, > > return -1; > > } > > if (bdrv_open2(bs, filename, BDRV_O_RDWR, drv) < 0) { > > + qerror_report(QERR_OPEN_FILE_FAILED, filename); > > return -1; > > } > > return monitor_read_bdrv_key_start(mon, bs, NULL, NULL); > > -- > > We want this fix for QMP. Without it, we get UndefinedError, and a > complaint ifdef CONFIG_DEBUG_MONITOR. I'm not terribly familiar with the QMP stuff. Are you looking for me to fix some some stuff in the QMP bits? Are you just indicating that you need this fix for QMP? -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@us.ibm.com