mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 11:22:26 +00:00
vhost-user: Make ActivateError messages more consistent
Originally, VhostUserSetup is only used by vhost-user-fs. While vhost-user-blk and vhost-user-net have their own error messages, we rename VhostUserSetup to VhostUserFsSetup. Signed-off-by: Jiachen Zhang <zhangjiachen.jaycee@bytedance.com>
This commit is contained in:
parent
675a8f808c
commit
16b82f3dfe
@ -85,11 +85,11 @@ pub enum ActivateError {
|
|||||||
CloneKillEventFd,
|
CloneKillEventFd,
|
||||||
/// Failed to create Vhost-user interrupt eventfd
|
/// Failed to create Vhost-user interrupt eventfd
|
||||||
VhostIrqCreate,
|
VhostIrqCreate,
|
||||||
/// Failed to setup vhost-user daemon.
|
/// Failed to setup vhost-user-fs daemon.
|
||||||
VhostUserSetup(vhost_user::Error),
|
VhostUserFsSetup(vhost_user::Error),
|
||||||
/// Failed to setup vhost-user daemon.
|
/// Failed to setup vhost-user-net daemon.
|
||||||
VhostUserNetSetup(vhost_user::Error),
|
VhostUserNetSetup(vhost_user::Error),
|
||||||
/// Failed to setup vhost-user daemon.
|
/// Failed to setup vhost-user-blk daemon.
|
||||||
VhostUserBlkSetup(vhost_user::Error),
|
VhostUserBlkSetup(vhost_user::Error),
|
||||||
/// Failed to reset vhost-user daemon.
|
/// Failed to reset vhost-user daemon.
|
||||||
VhostUserReset(vhost_user::Error),
|
VhostUserReset(vhost_user::Error),
|
||||||
|
@ -433,7 +433,7 @@ impl VirtioDevice for Fs {
|
|||||||
&interrupt_cb,
|
&interrupt_cb,
|
||||||
self.common.acked_features,
|
self.common.acked_features,
|
||||||
)
|
)
|
||||||
.map_err(ActivateError::VhostUserSetup)?;
|
.map_err(ActivateError::VhostUserFsSetup)?;
|
||||||
|
|
||||||
// Initialize slave communication.
|
// Initialize slave communication.
|
||||||
let slave_req_handler = if self.slave_req_support {
|
let slave_req_handler = if self.slave_req_support {
|
||||||
@ -447,13 +447,13 @@ impl VirtioDevice for Fs {
|
|||||||
|
|
||||||
let mut req_handler =
|
let mut req_handler =
|
||||||
MasterReqHandler::new(vu_master_req_handler).map_err(|e| {
|
MasterReqHandler::new(vu_master_req_handler).map_err(|e| {
|
||||||
ActivateError::VhostUserSetup(Error::MasterReqHandlerCreation(e))
|
ActivateError::VhostUserFsSetup(Error::MasterReqHandlerCreation(e))
|
||||||
})?;
|
})?;
|
||||||
req_handler.set_reply_ack_flag(true);
|
req_handler.set_reply_ack_flag(true);
|
||||||
self.vu
|
self.vu
|
||||||
.set_slave_request_fd(req_handler.get_tx_raw_fd())
|
.set_slave_request_fd(req_handler.get_tx_raw_fd())
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
ActivateError::VhostUserSetup(Error::VhostUserSetSlaveRequestFd(e))
|
ActivateError::VhostUserFsSetup(Error::VhostUserSetSlaveRequestFd(e))
|
||||||
})?;
|
})?;
|
||||||
Some(req_handler)
|
Some(req_handler)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user