kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kvm tools: Correctly limit nrcpus to max_cpus
@ 2011-12-08  2:47 Matt Evans
  0 siblings, 0 replies; only message in thread
From: Matt Evans @ 2011-12-08  2:47 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: KVM list

Fix a typo where kvm->nrcpus was set, then immediately overwritten with
older value.

Signed-off-by: Matt Evans <matt@ozlabs.org>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-08  2:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-08  2:47 [PATCH] kvm tools: Correctly limit nrcpus to max_cpus Matt Evans

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).