mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
FwCfgConfig already has a Default impl (e820/kernel/cmdline/initramfs/ acpi_tables = true, items = None), but deserialization did not use it: without serde default every field was mandatory, so any caller building a payload config over the API had to spell out the whole object even to flip a single flag. Add a container-level #[serde(default)] so missing fields fall back to FwCfgConfig::default(). The container form is required here because the defaults are all true; a per-field #[serde(default)] would resolve bool to false and contradict the Default impl. This lets callers send only the fields that differ from the defaults. Assisted-by: Claude:Opus-4.8 Signed-off-by: Ruben Hakobyan <hruben@meta.com>