diff options
author | johannst <johannes.stoelp@gmail.com> | 2021-05-28 21:45:40 +0200 |
---|---|---|
committer | johannst <johannes.stoelp@gmail.com> | 2021-05-28 21:45:40 +0200 |
commit | efd2dbdaffe41c4cd89d762ec6d3828449b173cb (patch) | |
tree | b5a8feda36f005238bb61f80e839a3f9d566370b | |
parent | 786a195f8e81d4f7c0af2a82b9d458361d424a71 (diff) | |
download | mini-kvm-rs-efd2dbdaffe41c4cd89d762ec6d3828449b173cb.tar.gz mini-kvm-rs-efd2dbdaffe41c4cd89d762ec6d3828449b173cb.zip |
kvm_sys: remove Display impl
-rw-r--r-- | src/kvm_sys.rs | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/kvm_sys.rs b/src/kvm_sys.rs index 8d5c85b..8179a8f 100644 --- a/src/kvm_sys.rs +++ b/src/kvm_sys.rs @@ -5,8 +5,6 @@ // Generated by `build.rs`. include!(concat!(env!("OUT_DIR"), "/kvm_constants.rs")); -use std::fmt; - #[repr(C)] #[derive(Default, Debug)] pub struct Rflags(pub u64); @@ -143,55 +141,6 @@ union kvm_run_union_s { padding: [u8; 2048], } -// {{{ Display : Rflags - -impl fmt::Display for Rflags { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let IF = || (self.0 >> 9) & 0b1; - let IOPL = || (self.0 >> 12) & 0b11; - let AC = || (self.0 >> 19) & 0b1; - write!(f, "AC({}) IOPL({}) IF({})", AC(), IOPL(), IF()) - } -} - -// }}} -// {{{ Display : kvm_regs - -impl fmt::Display for kvm_regs { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!( - f, - "rax: {:#018x} rbx: {:#018x} rcx: {:#018x} rdx: {:#018x}\n\ - rsi: {:#018x} rdi: {:#018x}\n\ - r8 : {:#018x} r9 : {:#018x} r10: {:#018x} r11: {:#018x}\n\ - r12: {:#018x} r13: {:#018x} r14: {:#018x} r15: {:#018x}\n\ - rsp: {:#018x} rbp: {:#018x}\n\ - rip: {:#018x} rflags: {:#018x} [{}]", - self.rax, - self.rbx, - self.rcx, - self.rdx, - self.rsi, - self.rdi, - self.r8, - self.r9, - self.r10, - self.r11, - self.r12, - self.r13, - self.r14, - self.r15, - self.rsp, - self.rbp, - self.rip, - self.rflags.0, - self.rflags - ) - } -} - -// }}} - #[cfg(test)] mod tests { use super::*; |