From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7eSK-0001eG-R6 for qemu-devel@nongnu.org; Tue, 31 May 2016 03:51:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7eSJ-0005Sv-OQ for qemu-devel@nongnu.org; Tue, 31 May 2016 03:51:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7eSJ-0005Sr-Ih for qemu-devel@nongnu.org; Tue, 31 May 2016 03:51:15 -0400 From: Markus Armbruster References: <1464676956-8460-1-git-send-email-robert.hu@intel.com> <1464676956-8460-3-git-send-email-robert.hu@intel.com> Date: Tue, 31 May 2016 09:51:12 +0200 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") Message-ID: <878tyq7jin.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 2/2] Explicitly print out default vnc option in use List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Robert Ho Cc: qemu-devel@nongnu.org, pbonzini@redhat.com Robert Ho 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 > --- > 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.