From: Markus Armbruster <armbru@redhat.com>
To: Robert Ho <robert.hu@intel.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/2] Explicitly print out default vnc option in use
Date: Tue, 31 May 2016 09:51:12 +0200 [thread overview]
Message-ID: <878tyq7jin.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <1464676956-8460-3-git-send-email-robert.hu@intel.com> (Robert Ho's message of "Tue, 31 May 2016 14:42:36 +0800")
Robert Ho <robert.hu@intel.com> writes:
> If no display option defined in QEMU command line, and SDL is not
> available, then it by default uses '-vnc localhost:0,to=99,id=default'.
> This patch simply print out the default option parameters out, so that
> user is aware of that.
>
> Signed-off-by: Robert Ho <robert.hu@intel.com>
> ---
> vl.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/vl.c b/vl.c
> index 18d1423..8617a68 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -4213,7 +4213,10 @@ int main(int argc, char **argv, char **envp)
> #elif defined(CONFIG_COCOA)
> display_type = DT_COCOA;
> #elif defined(CONFIG_VNC)
> - vnc_parse("localhost:0,to=99,id=default", &error_abort);
> + #define DEFAULT_VNC_DISPLAY_OPTION "localhost:0,to=99,id=default"
Preprocessor directives shouldn't be indented.
Also tab damage. Please use scripts/checkpatch.pl to check your patches.
> + vnc_parse(DEFAULT_VNC_DISPLAY_OPTION, &error_abort);
> + printf("No display option defined, using '-vnc %s' by default \
> +\n", DEFAULT_VNC_DISPLAY_OPTION);
> show_vnc_port = 1;
> #else
> display_type = DT_NONE;
I don't like this. Programs should be quiet unless they got something
important to say. Can't see why this particular default is more
important than all the other defaults we don't print.
The default could be documented in output of --help.
next prev parent reply other threads:[~2016-05-31 7:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 6:42 [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user Robert Ho
2016-05-31 6:42 ` [Qemu-devel] [PATCH 1/2] Reveal 'to' param of '-vnc' option in qemu man page Robert Ho
2016-05-31 6:42 ` [Qemu-devel] [PATCH 2/2] Explicitly print out default vnc option in use Robert Ho
2016-05-31 7:51 ` Markus Armbruster [this message]
2016-05-31 9:49 ` Robert Hu
2016-05-31 11:17 ` Markus Armbruster
2016-06-05 13:15 ` Robert Hu
2016-06-06 7:28 ` Markus Armbruster
2016-06-07 0:28 ` Robert Hu
2016-06-07 3:09 ` Robert Hu
2016-06-08 14:22 ` Markus Armbruster
2016-06-18 8:53 ` Robert Hu
2016-06-20 5:54 ` Markus Armbruster
-- strict thread matches above, loose matches on Subject: below --
2016-05-31 7:03 [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user Robert Ho
2016-05-31 7:03 ` [Qemu-devel] [PATCH 2/2] Explicitly print out default vnc option in use Robert Ho
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=878tyq7jin.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=robert.hu@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.