From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9u1M-0007ZX-3B for qemu-devel@nongnu.org; Tue, 20 Mar 2012 04:02:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9u0y-0004T3-IE for qemu-devel@nongnu.org; Tue, 20 Mar 2012 04:02:19 -0400 Received: from mail-ey0-f173.google.com ([209.85.215.173]:38273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9u0y-0004MS-9E for qemu-devel@nongnu.org; Tue, 20 Mar 2012 04:01:56 -0400 Received: by mail-ey0-f173.google.com with SMTP id f11so3332765eaa.4 for ; Tue, 20 Mar 2012 01:01:55 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 20 Mar 2012 09:01:35 +0100 Message-Id: <1332230498-20684-10-git-send-email-pbonzini@redhat.com> In-Reply-To: <1332230498-20684-1-git-send-email-pbonzini@redhat.com> References: <1332230498-20684-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 09/12] cmdline: reindent numa_add List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Paolo Bonzini --- vl.c | 72 +++++++++++++++++++++++++++++++++--------------------------------- 1 files changed, 36 insertions(+), 36 deletions(-) diff --git a/vl.c b/vl.c index ce55468..d9a9cac 100644 --- a/vl.c +++ b/vl.c @@ -950,49 +950,49 @@ static void numa_add(const char *optarg) int nodenr; optarg = get_opt_name(option, 128, optarg, ',') + 1; - if (!strcmp(option, "node")) { - if (get_param_value(option, 128, "nodeid", optarg) == 0) { - nodenr = nb_numa_nodes; - } else { - nodenr = strtoull(option, NULL, 10); - } + if (strcmp(option, "node")) { + return; + } + if (get_param_value(option, 128, "nodeid", optarg) == 0) { + nodenr = nb_numa_nodes; + } else { + nodenr = strtoull(option, NULL, 10); + } - if (get_param_value(option, 128, "mem", optarg) == 0) { - node_mem[nodenr] = 0; - } else { - int64_t sval; - sval = strtosz(option, &endptr); - if (sval < 0 || *endptr) { - fprintf(stderr, "qemu: invalid numa mem size: %s\n", optarg); - exit(1); - } - node_mem[nodenr] = sval; + if (get_param_value(option, 128, "mem", optarg) == 0) { + node_mem[nodenr] = 0; + } else { + int64_t sval; + sval = strtosz(option, &endptr); + if (sval < 0 || *endptr) { + fprintf(stderr, "qemu: invalid numa mem size: %s\n", optarg); + exit(1); } - if (get_param_value(option, 128, "cpus", optarg) == 0) { - node_cpumask[nodenr] = 0; + node_mem[nodenr] = sval; + } + if (get_param_value(option, 128, "cpus", optarg) == 0) { + node_cpumask[nodenr] = 0; + } else { + value = strtoull(option, &endptr, 10); + if (value >= 64) { + value = 63; + fprintf(stderr, "only 64 CPUs in NUMA mode supported.\n"); } else { - value = strtoull(option, &endptr, 10); - if (value >= 64) { - value = 63; - fprintf(stderr, "only 64 CPUs in NUMA mode supported.\n"); - } else { - if (*endptr == '-') { - endvalue = strtoull(endptr+1, &endptr, 10); - if (endvalue >= 63) { - endvalue = 62; - fprintf(stderr, - "only 63 CPUs in NUMA mode supported.\n"); - } - value = (2ULL << endvalue) - (1ULL << value); - } else { - value = 1ULL << value; + if (*endptr == '-') { + endvalue = strtoull(endptr+1, &endptr, 10); + if (endvalue >= 63) { + endvalue = 62; + fprintf(stderr, + "only 63 CPUs in NUMA mode supported.\n"); } + value = (2ULL << endvalue) - (1ULL << value); + } else { + value = 1ULL << value; } - node_cpumask[nodenr] = value; } - nb_numa_nodes++; + node_cpumask[nodenr] = value; } - return; + nb_numa_nodes++; } static int smp_init_func(QemuOpts *opts, void *opaque) -- 1.7.7.6