[PATCH] kvm tools: Correctly limit nrcpus to max_cpus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux