qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] disallow -daemonize usage of stdio (curses disp


From: Michael Tokarev
Subject: Re: [Qemu-devel] [PATCH] disallow -daemonize usage of stdio (curses display, -nographic, -serial stdio etc)
Date: Mon, 29 Oct 2012 16:26:58 +0400
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:10.0.9) Gecko/20121015 Icedove/10.0.9

29.10.2012 13:18, Stefan Hajnoczi wrote:
> On Sat, Oct 27, 2012 at 05:15:15PM +0400, Michael Tokarev wrote:
>> diff --git a/vl.c b/vl.c
>> index 9f99ef4..db48d62 100644
>> --- a/vl.c
>> +++ b/vl.c
>> @@ -3413,6 +3413,26 @@ int main(int argc, char **argv, char **envp)
>>          default_sdcard = 0;
>>      }
>>  
>> +    if (is_daemonized()) {
>> +        /* According to documentation and historically, -nographic redirects
>> +         * serial port, parallel port and monitor to stdio, which does not 
>> work
>> +         * with -daemonize.  We can redirect these to null instead, but 
>> since
>> +         * -nographic is legacy, let's just error out.
>> +         */
>> +        if (display_type == DT_NOGRAPHIC
>> +            /* && (default_parallel || default_serial
>> +                || default_monitor || default_virtcon) */) {
> 
> Uncomment these?

I'd say treat it as a documentation comment, sort of.
If all 4 other options are specified, -nographics has
no effect, so this very case is not very interesting --
once you specify all 4, you don't need -nographic.
But keeping this special case around makes behavour
less consistent: -nographic starts sometimes working
and sometimes not.

Now when it isn't possible to use stdio chr backend
with -daemonize, it isn't really necessary to test
even for DT_NOGRAPHIC: if we wont, next we'll try
to create stdio backend which will fail.  The only
purpose for this test is to give more understandable
error message.

(Checking for DT_CURSES is still necessary).

Thanks,

/mjt




reply via email to

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