devices: trim qualified paths

Import the modules used in the crate instead of spelling the
fully-qualified paths at every use site, and collapse Result<T,
io::Error> into io::Result<T>. This covers the feature-gated modules
(fw_cfg, ivshmem, pvmemcontrol) as well, leaving the whole crate free
of clippy::absolute_paths warnings.

Signed-off-by: Henry Hrvoje Tonkovac <htonkovac@gmail.com>
Assisted-by: Claude:Opus-4.8
This commit is contained in:
Henry Hrvoje Tonkovac
2026-06-11 12:09:05 +02:00
committed by Rob Bradford
parent 9eff92fb4b
commit 181d29ee90
14 changed files with 79 additions and 69 deletions

View File

@@ -5,6 +5,8 @@
use std::{io, result};
#[cfg(target_arch = "aarch64")]
use hypervisor::arch::aarch64::gic;
use thiserror::Error;
use vmm_sys_util::eventfd::EventFd;
@@ -41,7 +43,7 @@ pub enum Error {
#[cfg(target_arch = "aarch64")]
/// Failed restoring GIC device.
#[error("Failed restoring GIC device")]
RestoreGic(#[source] hypervisor::arch::aarch64::gic::Error),
RestoreGic(#[source] gic::Error),
#[cfg(target_arch = "riscv64")]
/// Failed creating AIA device.
#[error("Failed creating AIA device")]