mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
@@ -142,6 +142,7 @@ impl Blk {
|
||||
common: VirtioCommon {
|
||||
avail_features,
|
||||
acked_features,
|
||||
..Default::default()
|
||||
},
|
||||
id,
|
||||
vhost_user_blk,
|
||||
|
||||
@@ -358,6 +358,7 @@ impl Fs {
|
||||
common: VirtioCommon {
|
||||
avail_features,
|
||||
acked_features,
|
||||
..Default::default()
|
||||
},
|
||||
id,
|
||||
vu: master,
|
||||
|
||||
@@ -151,6 +151,7 @@ impl Net {
|
||||
common: VirtioCommon {
|
||||
avail_features,
|
||||
acked_features,
|
||||
..Default::default()
|
||||
},
|
||||
vhost_user_net,
|
||||
kill_evt: None,
|
||||
|
||||
Reference in New Issue
Block a user