From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ttj6y-0001Tw-C0 for qemu-devel@nongnu.org; Fri, 11 Jan 2013 13:13:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ttj6q-00032t-U0 for qemu-devel@nongnu.org; Fri, 11 Jan 2013 13:13:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:17874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ttj6q-00032O-Mm for qemu-devel@nongnu.org; Fri, 11 Jan 2013 13:13:40 -0500 From: Eduardo Habkost Date: Fri, 11 Jan 2013 16:15:08 -0200 Message-Id: <1357928108-21066-11-git-send-email-ehabkost@redhat.com> In-Reply-To: <1357928108-21066-1-git-send-email-ehabkost@redhat.com> References: <1357928108-21066-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [RFC 10/10] vl.c: Handle legacy "-numa node, cpus=A, B, C, D" format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: libvir-list@redhat.com, Chegu Vinod , Anthony Liguori As libvirt already uses this format and expects it to work, add a small hack to the legacy -numa option parsing code to make the "cpus=A,B,C,D" format work. Signed-off-by: Eduardo Habkost --- vl.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vl.c b/vl.c index 14bf9b6..cf30d44 100644 --- a/vl.c +++ b/vl.c @@ -1194,6 +1194,17 @@ static void parse_legacy_numa_node(const char *optarg) p++; } qemu_opt_set(opts, option, value); + + /* special case for "cpus", as it can contain "," */ + if (!strcmp(option, "cpus")) { + while (isdigit(*p)) { + p = get_opt_value(value, 128, p); + if (*p == ',') { + p++; + } + qemu_opt_set(opts, "cpus", value); + } + } } } -- 1.7.11.7