diff --git a/devices/src/interrupt_controller.rs b/devices/src/interrupt_controller.rs index 92fcf3ba0..957dcb876 100644 --- a/devices/src/interrupt_controller.rs +++ b/devices/src/interrupt_controller.rs @@ -18,22 +18,22 @@ pub enum Error { InvalidDeliveryMode, /// Failed creating the interrupt source group. #[error("Failed creating the interrupt source group: {0}")] - CreateInterruptSourceGroup(io::Error), + CreateInterruptSourceGroup(#[source] io::Error), /// Failed triggering the interrupt. #[error("Failed triggering the interrupt: {0}")] - TriggerInterrupt(io::Error), + TriggerInterrupt(#[source] io::Error), /// Failed masking the interrupt. #[error("Failed masking the interrupt: {0}")] - MaskInterrupt(io::Error), + MaskInterrupt(#[source] io::Error), /// Failed unmasking the interrupt. #[error("Failed unmasking the interrupt: {0}")] - UnmaskInterrupt(io::Error), + UnmaskInterrupt(#[source] io::Error), /// Failed updating the interrupt. #[error("Failed updating the interrupt: {0}")] - UpdateInterrupt(io::Error), + UpdateInterrupt(#[source] io::Error), /// Failed enabling the interrupt. #[error("Failed enabling the interrupt: {0}")] - EnableInterrupt(io::Error), + EnableInterrupt(#[source] io::Error), #[cfg(target_arch = "aarch64")] /// Failed creating GIC device. #[error("Failed creating GIC device: {0}")] diff --git a/devices/src/legacy/gpio_pl061.rs b/devices/src/legacy/gpio_pl061.rs index e69cb62a5..9b2a351b9 100644 --- a/devices/src/legacy/gpio_pl061.rs +++ b/devices/src/legacy/gpio_pl061.rs @@ -46,7 +46,7 @@ pub enum Error { #[error("GPIO interrupt disabled by guest driver.")] GpioInterruptDisabled, #[error("Could not trigger GPIO interrupt: {0}.")] - GpioInterruptFailure(io::Error), + GpioInterruptFailure(#[source] io::Error), #[error("Invalid GPIO Input key triggered: {0}.")] GpioTriggerKeyFailure(u32), } diff --git a/devices/src/legacy/rtc_pl031.rs b/devices/src/legacy/rtc_pl031.rs index 0551d7e19..23e8e7854 100644 --- a/devices/src/legacy/rtc_pl031.rs +++ b/devices/src/legacy/rtc_pl031.rs @@ -46,7 +46,7 @@ pub enum Error { #[error("Bad Write Offset: {0}")] BadWriteOffset(u64), #[error("Failed to trigger interrupt: {0}")] - InterruptFailure(io::Error), + InterruptFailure(#[source] io::Error), } type Result = result::Result; diff --git a/devices/src/legacy/uart_pl011.rs b/devices/src/legacy/uart_pl011.rs index 84975d6aa..549d6b6a6 100644 --- a/devices/src/legacy/uart_pl011.rs +++ b/devices/src/legacy/uart_pl011.rs @@ -54,11 +54,11 @@ pub enum Error { #[error("pl011: DMA not implemented.")] DmaNotImplemented, #[error("Failed to trigger interrupt: {0}")] - InterruptFailure(io::Error), + InterruptFailure(#[source] io::Error), #[error("Failed to write: {0}")] - WriteAllFailure(io::Error), + WriteAllFailure(#[source] io::Error), #[error("Failed to flush: {0}")] - FlushFailure(io::Error), + FlushFailure(#[source] io::Error), } type Result = result::Result;