mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-21 19:02:30 +00:00
vmm: Rename Booted vm state to Running
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
dbbd04a4cf
commit
d2d3abb13c
@ -231,7 +231,7 @@ impl Vmm {
|
||||
if let Some(ref mut vm) = self.vm {
|
||||
vm.pause()
|
||||
} else {
|
||||
Err(VmError::VmNotBooted)
|
||||
Err(VmError::VmNotRunning)
|
||||
}
|
||||
}
|
||||
|
||||
@ -239,7 +239,7 @@ impl Vmm {
|
||||
if let Some(ref mut vm) = self.vm {
|
||||
vm.resume()
|
||||
} else {
|
||||
Err(VmError::VmNotBooted)
|
||||
Err(VmError::VmNotRunning)
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,7 +247,7 @@ impl Vmm {
|
||||
if let Some(ref mut vm) = self.vm.take() {
|
||||
vm.shutdown()
|
||||
} else {
|
||||
Err(VmError::VmNotBooted)
|
||||
Err(VmError::VmNotRunning)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -213,8 +213,8 @@ pub enum Error {
|
||||
/// VM is not created
|
||||
VmNotCreated,
|
||||
|
||||
/// VM is not bootted
|
||||
VmNotBooted,
|
||||
/// VM is not running
|
||||
VmNotRunning,
|
||||
|
||||
/// Cannot clone EventFd.
|
||||
EventFdClone(io::Error),
|
||||
@ -439,7 +439,7 @@ pub struct VmInfo<'a> {
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub enum VmState {
|
||||
Created,
|
||||
Booted,
|
||||
Running,
|
||||
Shutdown,
|
||||
Paused,
|
||||
}
|
||||
@ -843,9 +843,9 @@ impl Vm {
|
||||
vcpu_thread.thread().unpark();
|
||||
}
|
||||
|
||||
// And we're back to Booted state.
|
||||
// And we're back to the Running state.
|
||||
let mut state = self.state.try_write().map_err(|_| Error::PoisonedState)?;
|
||||
*state = VmState::Booted;
|
||||
*state = VmState::Running;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@ -965,7 +965,7 @@ impl Vm {
|
||||
}
|
||||
|
||||
let mut state = self.state.try_write().map_err(|_| Error::PoisonedState)?;
|
||||
*state = VmState::Booted;
|
||||
*state = VmState::Running;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user