[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 16:46:01 +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 16:39, Alex Williamson wrote:
> On Fri, 2011-01-07 at 09:51 +0100, Jan Kiszka wrote:
>> 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.
>
> Indeed, mon is NULL. That makes this an easy
>
> if (mon) {
> monitor_printf()
> } else {
> fprintf()
> }
>
> But I wonder if we should put the fprintf in the monitor_printf() path
> so we're not just special casing this one user. Should all
> monitor_printfs go to stderr if there's no monitor? Thanks,
IIRC, there are valid cased where you want to suppress status updates of
some subsystem by handing out a NULL monitor.
If this error is critical (likely), then user error_report instead. It
does the right thing.
Jan
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH v3] savevm: Fix no_migrate, Alex Williamson, 2011/01/07