vmm: config: Use Default::default() value for initramfs field

This ensures that the field is filled with None when it is not specified
as part of the deserialisation step.

Fixes: #1015

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-04-09 15:15:03 +01:00 committed by Sebastien Boeuf
parent 4617aefd60
commit c260640fd5

View File

@ -1160,6 +1160,7 @@ pub struct VmConfig {
#[serde(default)]
pub memory: MemoryConfig,
pub kernel: Option<KernelConfig>,
#[serde(default)]
pub initramfs: Option<InitramfsConfig>,
#[serde(default)]
pub cmdline: CmdlineConfig,