qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Hitoshi Mitake <h.mitake@gmail.com>,
	qemu-devel@nongnu.org, Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH] disallow -daemonize usage of stdio (curses display, -nographic, -serial stdio etc)
Date: Wed, 31 Oct 2012 09:12:24 +0100	[thread overview]
Message-ID: <20121031081224.GE1116@stefanha-thinkpad> (raw)
In-Reply-To: <508E7612.9070306@msgid.tls.msk.ru>

On Mon, Oct 29, 2012 at 04:26:58PM +0400, Michael Tokarev wrote:
> 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.

In that case I suggest we remove it or replace it with a comment in
English.  Commented out code usually confuses me more than helps, as
this example shows :).

Stefan

      reply	other threads:[~2012-10-31  8:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-27 13:15 [Qemu-devel] [PATCH] disallow -daemonize usage of stdio (curses display, -nographic, -serial stdio etc) Michael Tokarev
2012-10-29  9:18 ` Stefan Hajnoczi
2012-10-29 12:26   ` Michael Tokarev
2012-10-31  8:12     ` Stefan Hajnoczi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121031081224.GE1116@stefanha-thinkpad \
    --to=stefanha@gmail.com \
    --cc=anthony@codemonkey.ws \
    --cc=blauwirbel@gmail.com \
    --cc=h.mitake@gmail.com \
    --cc=mjt@tls.msk.ru \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).