mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: lib: Allow config changes before the VM is booted
Instead of erroring out when trying to change the configuration of the VM somewhere between the VM was created but not yet booted, let's allow users to change that without any issue, as long as the VM has already been created. Fixes: #3639 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
committed by
Bo Chen
parent
b780a916bb
commit
5d2db68f67
@@ -210,7 +210,7 @@ pub enum ApiResponsePayload {
|
||||
VmmPing(VmmPingResponse),
|
||||
|
||||
/// Vm action response
|
||||
VmAction(Vec<u8>),
|
||||
VmAction(Option<Vec<u8>>),
|
||||
}
|
||||
|
||||
/// This is the response sent by the VMM API server through the mpsc channel.
|
||||
@@ -439,7 +439,7 @@ fn vm_action(
|
||||
api_evt.write(1).map_err(ApiError::EventFdWrite)?;
|
||||
|
||||
let body = match response_receiver.recv().map_err(ApiError::ResponseRecv)?? {
|
||||
ApiResponsePayload::VmAction(response) => Some(Body::new(response)),
|
||||
ApiResponsePayload::VmAction(response) => response.map(Body::new),
|
||||
ApiResponsePayload::Empty => None,
|
||||
_ => return Err(ApiError::ResponsePayloadType),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user