mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: vhost_user: Adapt state() to return Result
This is a refactoring step in preparation for fetching backend device state via SET_DEVICE_STATE_FD which can fail. Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
@@ -220,7 +220,7 @@ impl Net {
|
||||
})
|
||||
}
|
||||
|
||||
fn state(&self) -> State {
|
||||
fn state(&self) -> std::result::Result<State, MigratableError> {
|
||||
self.vu_common.state(&self.common, self.config)
|
||||
}
|
||||
}
|
||||
@@ -425,7 +425,7 @@ impl Snapshottable for Net {
|
||||
}
|
||||
|
||||
fn snapshot(&mut self) -> std::result::Result<Snapshot, MigratableError> {
|
||||
self.vu_common.snapshot(&self.state())
|
||||
self.vu_common.snapshot(&self.state()?)
|
||||
}
|
||||
}
|
||||
impl Transportable for Net {}
|
||||
|
||||
Reference in New Issue
Block a user