* [Qemu-devel] [PATCH] fix '-cpu ?' Segfault @ 2012-03-21 12:33 Eduardo Habkost 2012-03-21 13:24 ` Stefan Hajnoczi 2012-03-22 13:28 ` Stefan Berger 0 siblings, 2 replies; 7+ messages in thread From: Eduardo Habkost @ 2012-03-21 12:33 UTC (permalink / raw) To: qemu-devel; +Cc: Jiri Denemark Fix stupid copy&paste mistake at commit ecf40beae7dcbb057d4f115207f9d8276832a774: I moved code around but kept "optarg" on the cpu_list() call. Reported-by: Jiri Denemark <jdenemar@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- 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 == '?') { - list_cpus(stdout, &fprintf, optarg); + list_cpus(stdout, &fprintf, cpu_model); exit(0); } -- 1.7.3.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] fix '-cpu ?' Segfault 2012-03-21 12:33 [Qemu-devel] [PATCH] fix '-cpu ?' Segfault Eduardo Habkost @ 2012-03-21 13:24 ` Stefan Hajnoczi 2012-03-22 13:28 ` Stefan Berger 1 sibling, 0 replies; 7+ messages in thread From: Stefan Hajnoczi @ 2012-03-21 13:24 UTC (permalink / raw) To: Eduardo Habkost; +Cc: Jiri Denemark, qemu-devel On Wed, Mar 21, 2012 at 09:33:40AM -0300, 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 <jdenemar@redhat.com> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> > --- > vl.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) Thanks, applied to the trivial patches tree: https://github.com/stefanha/qemu/commits/trivial-patches Stefan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] fix '-cpu ?' Segfault 2012-03-21 12:33 [Qemu-devel] [PATCH] fix '-cpu ?' Segfault Eduardo Habkost 2012-03-21 13:24 ` Stefan Hajnoczi @ 2012-03-22 13:28 ` Stefan Berger 2012-03-22 13:46 ` Andreas Färber 2012-03-23 20:31 ` Michael Roth 1 sibling, 2 replies; 7+ messages in thread From: Stefan Berger @ 2012-03-22 13:28 UTC (permalink / raw) To: qemu-devel 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<jdenemar@redhat.com> > Signed-off-by: Eduardo Habkost<ehabkost@redhat.com> > --- > 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 == '?') { > - 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. Stefan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] fix '-cpu ?' Segfault 2012-03-22 13:28 ` Stefan Berger @ 2012-03-22 13:46 ` Andreas Färber 2012-03-22 14:05 ` Eduardo Habkost 2012-03-23 20:31 ` Michael Roth 1 sibling, 1 reply; 7+ messages in thread From: Andreas Färber @ 2012-03-22 13:46 UTC (permalink / raw) To: Stefan Berger; +Cc: Stefan Hajnoczi, qemu-devel, 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<jdenemar@redhat.com> >> Signed-off-by: Eduardo Habkost<ehabkost@redhat.com> >> --- >> 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 == '?') { >> - 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 -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] fix '-cpu ?' Segfault 2012-03-22 13:46 ` Andreas Färber @ 2012-03-22 14:05 ` Eduardo Habkost 0 siblings, 0 replies; 7+ messages in thread From: Eduardo Habkost @ 2012-03-22 14:05 UTC (permalink / raw) To: Andreas Färber; +Cc: Stefan Hajnoczi, qemu-devel, Stefan Berger On Thu, Mar 22, 2012 at 02:46:48PM +0100, Andreas Färber wrote: > 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<jdenemar@redhat.com> > >> Signed-off-by: Eduardo Habkost<ehabkost@redhat.com> > >> --- > >> 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 == '?') { > >> - 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. No, list_cpus() expects the whole argument string, including the leading "?": void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg) { /* XXX: implement xxx_cpu_list for targets that still miss it */ #if defined(cpu_list_id) cpu_list_id(f, cpu_fprintf, optarg); #elif defined(cpu_list) cpu_list(f, cpu_fprintf); /* deprecated */ #endif } [...] #define cpu_list_id x86_cpu_list [...] void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf, const char *optarg) { unsigned char model = !strcmp("?model", optarg); unsigned char dump = !strcmp("?dump", optarg); unsigned char cpuid = !strcmp("?cpuid", optarg); [...] -- Eduardo ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] fix '-cpu ?' Segfault 2012-03-22 13:28 ` Stefan Berger 2012-03-22 13:46 ` Andreas Färber @ 2012-03-23 20:31 ` Michael Roth 2012-03-23 20:37 ` Alon Levy 1 sibling, 1 reply; 7+ messages in thread From: Michael Roth @ 2012-03-23 20:31 UTC (permalink / raw) To: Stefan Berger; +Cc: qemu-devel On Thu, Mar 22, 2012 at 09:28:16AM -0400, Stefan Berger wrote: > 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<jdenemar@redhat.com> > >Signed-off-by: Eduardo Habkost<ehabkost@redhat.com> > >--- > > 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 == '?') { > >- 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. I think this is actually just a shell issue: mdroth@illuin:~/tmp/empty$ ls mdroth@illuin:~/tmp/empty$ echo ? ? mdroth@illuin:~/tmp/empty$ touch a mdroth@illuin:~/tmp/empty$ echo ? a mdroth@illuin:~/tmp/empty$ echo ?_ ?_ > > Stefan > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] fix '-cpu ?' Segfault 2012-03-23 20:31 ` Michael Roth @ 2012-03-23 20:37 ` Alon Levy 0 siblings, 0 replies; 7+ messages in thread From: Alon Levy @ 2012-03-23 20:37 UTC (permalink / raw) To: Michael Roth; +Cc: qemu-devel, Stefan Berger On Fri, Mar 23, 2012 at 03:31:48PM -0500, Michael Roth wrote: > On Thu, Mar 22, 2012 at 09:28:16AM -0400, Stefan Berger wrote: > > 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<jdenemar@redhat.com> > > >Signed-off-by: Eduardo Habkost<ehabkost@redhat.com> > > >--- > > > 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 == '?') { > > >- 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. use "-cpu \?" > > I think this is actually just a shell issue: > > mdroth@illuin:~/tmp/empty$ ls > mdroth@illuin:~/tmp/empty$ echo ? > ? > mdroth@illuin:~/tmp/empty$ touch a > mdroth@illuin:~/tmp/empty$ echo ? > a > mdroth@illuin:~/tmp/empty$ echo ?_ > ?_ > > > > > Stefan > > > > > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-03-23 20:37 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-03-21 12:33 [Qemu-devel] [PATCH] fix '-cpu ?' Segfault Eduardo Habkost 2012-03-21 13:24 ` Stefan Hajnoczi 2012-03-22 13:28 ` Stefan Berger 2012-03-22 13:46 ` Andreas Färber 2012-03-22 14:05 ` Eduardo Habkost 2012-03-23 20:31 ` Michael Roth 2012-03-23 20:37 ` Alon Levy
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).