From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAiLw-0007ze-Na for qemu-devel@nongnu.org; Thu, 22 Mar 2012 09:47:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SAiLq-0005Xp-C1 for qemu-devel@nongnu.org; Thu, 22 Mar 2012 09:46:56 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38102 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAiLq-0005Xk-5y for qemu-devel@nongnu.org; Thu, 22 Mar 2012 09:46:50 -0400 Message-ID: <4F6B2D48.6090400@suse.de> Date: Thu, 22 Mar 2012 14:46:48 +0100 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1332333220-31420-1-git-send-email-ehabkost@redhat.com> <4F6B28F0.9060301@linux.vnet.ibm.com> In-Reply-To: <4F6B28F0.9060301@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] fix '-cpu ?' Segfault List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Berger Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, Eduardo Habkost Am 22.03.2012 14:28, schrieb Stefan Berger: > On 03/21/2012 08:33 AM, Eduardo Habkost wrote: >> Fix stupid copy&paste mistake at commit >> ecf40beae7dcbb057d4f115207f9d8276832a774: I moved code around but kept >> "optarg" on the cpu_list() call. >> >> Reported-by: Jiri Denemark >> Signed-off-by: Eduardo Habkost >> --- >> vl.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/vl.c b/vl.c >> index 112b0e0..0fccf50 100644 >> --- a/vl.c >> +++ b/vl.c >> @@ -3196,7 +3196,7 @@ int main(int argc, char **argv, char **envp) >> cpudef_init(); >> >> if (cpu_model&& *cpu_model =3D=3D '?') { >> - list_cpus(stdout,&fprintf, optarg); >> + list_cpus(stdout,&fprintf, cpu_model); >> exit(0); >> } >> > Does -cpu ? actually work then? I only see the list of cpus when using > -cpu ?_ for example. You're right, it should be cpu_model + 1 from what I recall, i.e. just the optional argument, not the whole model string. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg