From patchwork Thu Feb 4 15:49:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 44513 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3659BB7D47 for ; Fri, 5 Feb 2010 02:55:30 +1100 (EST) Received: from localhost ([127.0.0.1]:53586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nd43D-0004cC-91 for incoming@patchwork.ozlabs.org; Thu, 04 Feb 2010 10:55:27 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nd3y7-0002GY-Lb for qemu-devel@nongnu.org; Thu, 04 Feb 2010 10:50:11 -0500 Received: from [199.232.76.173] (port=38558 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nd3y7-0002GJ-63 for qemu-devel@nongnu.org; Thu, 04 Feb 2010 10:50:11 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nd3y5-00057Z-ED for qemu-devel@nongnu.org; Thu, 04 Feb 2010 10:50:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35303) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nd3y4-00057U-Rm for qemu-devel@nongnu.org; Thu, 04 Feb 2010 10:50:09 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o14Fo6Eu001769 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Feb 2010 10:50:06 -0500 Received: from localhost.localdomain (vpn1-5-172.ams2.redhat.com [10.36.5.172]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o14Fnx6J029856; Thu, 4 Feb 2010 10:50:05 -0500 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 4 Feb 2010 16:49:58 +0100 Message-Id: <1265298599-4186-4-git-send-email-pbonzini@redhat.com> In-Reply-To: <201002042313.45353.sheng@linux.intel.com> References: <201002042313.45353.sheng@linux.intel.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: aliguori@us.ibm.com, quintela@redhat.com, sheng@linux.intel.com Subject: [Qemu-devel] [PATCH 3/4] do not interpolate % from vl.c to qemu-options.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Since qemu-options.h is only used in vl.c, we can avoid using brittle interpolation from a generated file. Signed-off-by: Paolo Bonzini --- qemu-options.hx | 11 ++++++----- vl.c | 9 +-------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 4c1bcfb..2fa9ed4 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -275,7 +275,8 @@ the write back by pressing @key{C-a s} (@pxref{disk_images}). ETEXI DEF("m", HAS_ARG, QEMU_OPTION_m, - "-m megs set virtual RAM size to megs MB [default=%d]\n") + "-m megs set virtual RAM size to megs MB [default=" + stringify(DEFAULT_RAM_SIZE) "]\n") STEXI @item -m @var{megs} Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB. Optionally, @@ -830,8 +831,8 @@ DEF("net", HAS_ARG, QEMU_OPTION_net, #else "-net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile][,sndbuf=nbytes][,vnet_hdr=on|off]\n" " connect the host TAP network interface to VLAN 'n' and use the\n" - " network scripts 'file' (default=%s)\n" - " and 'dfile' (default=%s)\n" + " network scripts 'file' (default=" DEFAULT_NETWORK_SCRIPT ")\n" + " and 'dfile' (default=" DEFAULT_NETWORK_DOWN_SCRIPT ")\n" " use '[down]script=no' to disable script execution\n" " use 'fd=h' to connect to an already opened TAP interface\n" " use 'sndbuf=nbytes' to limit the size of the send buffer (the\n" @@ -1664,7 +1665,7 @@ within gdb and establish the connection via a pipe: ETEXI DEF("s", 0, QEMU_OPTION_s, \ - "-s shorthand for -gdb tcp::%s\n") + "-s shorthand for -gdb tcp::" DEFAULT_GDBSTUB_PORT "\n") STEXI @item -s Shorthand for -gdb tcp::1234, i.e. open a gdbserver on TCP port 1234 @@ -1672,7 +1673,7 @@ Shorthand for -gdb tcp::1234, i.e. open a gdbserver on TCP port 1234 ETEXI DEF("d", HAS_ARG, QEMU_OPTION_d, \ - "-d item1,... output log to %s (use -d ? for a list of log items)\n") + "-d item1,... output log to /tmp/qemu.log (use -d ? for a list of log items)\n") STEXI @item -d Output log in /tmp/qemu.log diff --git a/vl.c b/vl.c index 39833fc..3d2de7b 100644 --- a/vl.c +++ b/vl.c @@ -4041,14 +4041,7 @@ static void help(int exitcode) "\n" "When using -nographic, press 'ctrl-a h' to get some help.\n" , - "qemu", - DEFAULT_RAM_SIZE, -#ifndef _WIN32 - DEFAULT_NETWORK_SCRIPT, - DEFAULT_NETWORK_DOWN_SCRIPT, -#endif - DEFAULT_GDBSTUB_PORT, - "/tmp/qemu.log"); + "qemu"); exit(exitcode); }