vmm: Make desired vCPUs optional in resize command

In order to be able to support resizing either vCPUs or memory or both
make the fields in the resize command optional.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-01-07 10:43:56 +00:00
committed by Samuel Ortiz
parent 72b9e920a3
commit f1b6657833
4 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -330,7 +330,7 @@ impl Vmm {
self.vm_delete()
}
fn vm_resize(&mut self, desired_vcpus: u8) -> result::Result<(), VmError> {
fn vm_resize(&mut self, desired_vcpus: Option<u8>) -> result::Result<(), VmError> {
if let Some(ref mut vm) = self.vm {
vm.resize(desired_vcpus)
} else {