From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Evans Subject: [PATCH] kvm tools: Correctly limit nrcpus to max_cpus Date: Thu, 08 Dec 2011 13:47:06 +1100 Message-ID: <4EE0252A.3020806@ozlabs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: KVM list To: Pekka Enberg Return-path: Received: from ozlabs.org ([203.10.76.45]:35749 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753823Ab1LHCqS (ORCPT ); Wed, 7 Dec 2011 21:46:18 -0500 Sender: kvm-owner@vger.kernel.org List-ID: Fix a typo where kvm->nrcpus was set, then immediately overwritten with older value. Signed-off-by: Matt Evans --- tools/kvm/builtin-run.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index cbf8777..84db7ea 100644 --- a/tools/kvm/builtin-run.c +++ b/tools/kvm/builtin-run.c @@ -820,7 +820,7 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix) if (nrcpus > max_cpus) { printf(" # Limit the number of CPUs to %d\n", max_cpus); - kvm->nrcpus = max_cpus; + nrcpus = max_cpus; } else if (nrcpus > recommended_cpus) { printf(" # Warning: The maximum recommended amount of VCPUs" " is %d\n", recommended_cpus); -- 1.7.0.4