diff --git a/CODEOWNERS b/CODEOWNERS index 31d83d4..bcfc569 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,2 +1,2 @@ # Add the list of code owners here (using their GitHub username) -* @andreeaflorescu @lauralt @gsserge @roypat @JonathanWoollett-Light +* @andreeaflorescu @lauralt @gsserge @roypat @ShadowCurse diff --git a/rust-vmm-ci b/rust-vmm-ci index 7606478..0503867 160000 --- a/rust-vmm-ci +++ b/rust-vmm-ci @@ -1 +1 @@ -Subproject commit 7606478202667234d9378d6850bfda9c219eee7b +Subproject commit 05038671bbc09476d9051c884f754689ae1774f9 diff --git a/vm-superio/src/serial.rs b/vm-superio/src/serial.rs index aa8ac36..0e84a2e 100644 --- a/vm-superio/src/serial.rs +++ b/vm-superio/src/serial.rs @@ -11,6 +11,8 @@ //! This is done by emulating an UART serial port. use std::collections::VecDeque; +use std::error::Error as StdError; +use std::fmt; use std::io::{self, Write}; use std::result::Result; use std::sync::Arc; @@ -292,6 +294,18 @@ pub enum Error { FullFifo, } +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match self { + Error::Trigger(e) => write!(f, "Failed to trigger interrupt: {}", e), + Error::IOError(e) => write!(f, "Couldn't write/flush to the given destination: {}", e), + Error::FullFifo => write!(f, "No space left in FIFO"), + } + } +} + +impl StdError for Error {} + impl Serial { /// Creates a new `Serial` instance which writes the guest's output to /// `out` and uses `trigger` object to notify the driver about new