Skip to contentSkip to conversation

kvm tools: Correctly limit nrcpus to max_cpus

PATCH New Matt Evans 1 participant 1 message Dec 8, 2011 KVM

lore
Share & tools
lore

Matt Evans

author
#0 lore raw

PATCH 1/1 kvm tools: Correctly limit nrcpus to max_cpus

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

---
 tools/kvm/builtin-run.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/kvm/builtin-run.c +1 -1
index cbf8777..84db7ea 100644
@@ -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);
Signature · 1 line
1.7.0.4