From 93f5f6ed45c0d7677d0fd526d16d9e3fc2bf2be2 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Fri, 13 Dec 2019 12:10:13 +0100 Subject: [PATCH] vmm: config: Provide a default empty command line through OpenAPI The OpenAPI should not have to provide a command line since the CLI considers the command line as an empty string if nothing is provided. Signed-off-by: Sebastien Boeuf --- vmm/src/config.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vmm/src/config.rs b/vmm/src/config.rs index de59bb267..da2d17448 100644 --- a/vmm/src/config.rs +++ b/vmm/src/config.rs @@ -304,7 +304,7 @@ pub struct KernelConfig { pub path: PathBuf, } -#[derive(Clone, Deserialize, Serialize)] +#[derive(Clone, Default, Deserialize, Serialize)] pub struct CmdlineConfig { pub args: String, } @@ -941,6 +941,7 @@ pub struct VmConfig { #[serde(default)] pub memory: MemoryConfig, pub kernel: Option, + #[serde(default)] pub cmdline: CmdlineConfig, pub disks: Option>, pub net: Option>,