mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-virtio: fs: Factorize vhost-user setup
This patch factorizes the existing virtio-fs code by relying onto the common code part of the vhost_user module in the vm-virtio crate. In details, it factorizes the vhost-user setup, and reuses the error types defined by the module instead of defining its own types. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
56cad00f2e
commit
b7d3ad9063
@@ -49,6 +49,8 @@ pub enum Error {
|
||||
VhostUserCreateMaster(VhostError),
|
||||
/// Failed to open vhost device.
|
||||
VhostUserOpen(VhostError),
|
||||
/// Connection to socket failed.
|
||||
VhostUserConnect(vhost_rs::Error),
|
||||
/// Get features failed.
|
||||
VhostUserGetFeatures(VhostError),
|
||||
/// Get protocol features failed.
|
||||
@@ -85,6 +87,10 @@ pub enum Error {
|
||||
VhostUserMemoryRegion(MmapError),
|
||||
/// Failed to handle vhost-user slave request.
|
||||
VhostUserSlaveRequest(vhost_rs::vhost_user::Error),
|
||||
/// Failed to create the master request handler from slave.
|
||||
MasterReqHandlerCreation(vhost_rs::vhost_user::Error),
|
||||
/// Set slave request fd failed.
|
||||
VhostUserSetSlaveRequestFd(vhost_rs::Error),
|
||||
/// Invalid used address.
|
||||
UsedAddress,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user