[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] savevm: print migration failure to stderr rathe
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] Re: [PATCH] savevm: print migration failure to stderr rather than monitor |
Date: |
Fri, 07 Jan 2011 09:51:25 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
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.
>
> Signed-off-by: Alex Williamson <address@hidden>
> ---
>
> 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;
> }
> }
>
>
>
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH v3] savevm: Fix no_migrate, Alex Williamson, 2011/01/07