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
@@ -142,6 +142,7 @@ impl Blk {
common: VirtioCommon {
avail_features,
acked_features,
..Default::default()
},
id,
vhost_user_blk,
+1
View File
@@ -358,6 +358,7 @@ impl Fs {
common: VirtioCommon {
avail_features,
acked_features,
..Default::default()
},
id,
vu: master,
+1
View File
@@ -151,6 +151,7 @@ impl Net {
common: VirtioCommon {
avail_features,
acked_features,
..Default::default()
},
vhost_user_net,
kill_evt: None,