vmm: Handle ApiRequest::VmCreate in a separate function

It simplifies a bit the `Vmm::control_loop` and reads better to be
consistent with other `ApiRequest` handlers. Also, it removes the
repetitive `ApiError::VmAlreadyCreated` and makes `ApiError::VmCreate`
useful.

No functional changes.

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2021-06-24 06:29:42 -07:00
committed by Sebastien Boeuf
parent 54c552f90d
commit 1075209e2a
2 changed files with 15 additions and 11 deletions

View File

@@ -64,9 +64,6 @@ pub enum ApiError {
/// The VM could not boot.
VmBoot(VmError),
/// The VM is already created.
VmAlreadyCreated,
/// The VM could not be created.
VmCreate(VmError),