rust/pv_core: Always report rc and rrc for an UV error

The (non-archiected) rrc helps to debug issues. Therefore report them
also in release builds.

Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Julian Ruess <julianr@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Steffen Eiden
2024-02-20 12:09:49 +01:00
committed by Jan Höppner
parent a2e556858a
commit 32a0434bc3

View File

@@ -10,8 +10,7 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;
#[derive(thiserror::Error, Debug)]
#[non_exhaustive]
pub enum Error {
#[cfg_attr(debug_assertions, error("Ultravisor: '{msg}' ({rc:#06x},{rrc:#06x})"))]
#[cfg_attr(not(debug_assertions), error("Ultravisor: '{msg}' ({rc:#06x})"))]
#[error("Ultravisor: '{msg}' ({rc:#06x},{rrc:#06x})")]
Uv {
rc: u16,
rrc: u16,