hypervisor: cpu: Fix get/set one reg error message

The error message of `SetRegister` and `GetRegister` fail to describe
the reason as the error variant suggests. Fixed error message
accordingly.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
Ruoqing He 2024-09-23 11:16:05 +08:00 committed by Rob Bradford
parent be5fc769e9
commit e9f137dc4a

View File

@ -165,12 +165,12 @@ pub enum HypervisorCpuError {
/// ///
/// Setting one reg error /// Setting one reg error
/// ///
#[error("Failed to init vcpu: {0}")] #[error("Failed to set one reg: {0}")]
SetRegister(#[source] anyhow::Error), SetRegister(#[source] anyhow::Error),
/// ///
/// Getting one reg error /// Getting one reg error
/// ///
#[error("Failed to init vcpu: {0}")] #[error("Failed to get one reg: {0}")]
GetRegister(#[source] anyhow::Error), GetRegister(#[source] anyhow::Error),
/// ///
/// Getting guest clock paused error /// Getting guest clock paused error