mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: config: Switch NetConfig to use PciDeviceCommonConfig
Switch NetConfig over to using the newly extracted struct members as used by all PCI based devices. The use of #[serde(flatten)] means that this change has no impact on the JSON format that the data is stored as. Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
@@ -1879,7 +1879,9 @@ impl RequestHandler for Vmm {
|
||||
for net in restored_nets.iter() {
|
||||
for net_config in vm_net_configs.iter_mut() {
|
||||
// update only if the net dev is backed by FDs
|
||||
if net_config.id.as_ref() == Some(&net.id) && net_config.fds.is_some() {
|
||||
if net_config.pci_common.id.as_ref() == Some(&net.id)
|
||||
&& net_config.fds.is_some()
|
||||
{
|
||||
net_config.fds.clone_from(&net.fds);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user