qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Add qerror message if the 'change' target filen


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] Add qerror message if the 'change' target filename can't be opened
Date: Thu, 25 Mar 2010 17:40:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Ryan Harper <address@hidden> 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 <address@hidden>
> ---
>  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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]