virtio-devices: Use Default::default() for transitioning to VirtioCommon

In order to simplify the transition to VirtioCommon and to avoid needing
to set empty fields derive Default for VirtioCommon.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-09-03 16:56:32 +01:00
parent 008cf4a5ae
commit a9a138460b
14 changed files with 14 additions and 10 deletions
+1
View File
@@ -183,6 +183,7 @@ pub trait DmaRemapping: Send + Sync {
}
/// Structure to handle device state common to all devices
#[derive(Default)]
pub struct VirtioCommon {
pub avail_features: u64,
pub acked_features: u64,