mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: trim qualified paths in formats
Import the std modules used in the disk-format handlers instead of spelling the full paths at every use site. Signed-off-by: Henry Hrvoje Tonkovac <htonkovac@gmail.com> Assisted-by: Claude:Opus-4.8
This commit is contained in:
committed by
Rob Bradford
parent
50f2fd369f
commit
2c22159802
@@ -5,6 +5,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
|
||||
|
||||
use std::collections::VecDeque;
|
||||
use std::io;
|
||||
use std::os::unix::io::RawFd;
|
||||
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
@@ -74,7 +75,7 @@ impl AsyncIo for RawSync {
|
||||
}
|
||||
};
|
||||
if result < 0 {
|
||||
let error = std::io::Error::last_os_error();
|
||||
let error = io::Error::last_os_error();
|
||||
return Err(if is_read {
|
||||
AsyncIoError::ReadVectored(error)
|
||||
} else {
|
||||
@@ -93,7 +94,7 @@ impl AsyncIo for RawSync {
|
||||
// SAFETY: FFI call
|
||||
let result = unsafe { libc::fsync(self.fd as libc::c_int) };
|
||||
if result < 0 {
|
||||
return Err(AsyncIoError::Fsync(std::io::Error::last_os_error()));
|
||||
return Err(AsyncIoError::Fsync(io::Error::last_os_error()));
|
||||
}
|
||||
|
||||
if let Some(user_data) = user_data {
|
||||
|
||||
Reference in New Issue
Block a user