misc: block: drop extern crate, use modern rust

This commit is part of a series of similar commits.

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
Philipp Schuster
2025-09-05 09:20:14 +02:00
committed by Rob Bradford
parent 75cdfb0117
commit 5f66a26b2e
6 changed files with 5 additions and 5 deletions
+1 -3
View File
@@ -8,9 +8,6 @@
// //
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause // SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
#[macro_use]
extern crate log;
pub mod async_io; pub mod async_io;
pub mod fcntl; pub mod fcntl;
pub mod fixed_vhd; pub mod fixed_vhd;
@@ -45,6 +42,7 @@ use std::{cmp, result};
#[cfg(feature = "io_uring")] #[cfg(feature = "io_uring")]
use io_uring::{IoUring, Probe, opcode}; use io_uring::{IoUring, Probe, opcode};
use libc::{S_IFBLK, S_IFMT, ioctl}; use libc::{S_IFBLK, S_IFMT, ioctl};
use log::{error, info, warn};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use smallvec::SmallVec; use smallvec::SmallVec;
use thiserror::Error; use thiserror::Error;
+1
View File
@@ -19,6 +19,7 @@ use std::str;
use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
use libc::{EINVAL, EIO, ENOSPC}; use libc::{EINVAL, EIO, ENOSPC};
use log::error;
use remain::sorted; use remain::sorted;
use thiserror::Error; use thiserror::Error;
use vmm_sys_util::file_traits::{FileSetLen, FileSync}; use vmm_sys_util::file_traits::{FileSetLen, FileSync};
+1
View File
@@ -7,6 +7,7 @@ use std::io::{Error, Seek, SeekFrom};
use std::os::unix::io::{AsRawFd, RawFd}; use std::os::unix::io::{AsRawFd, RawFd};
use io_uring::{IoUring, opcode, types}; use io_uring::{IoUring, opcode, types};
use log::warn;
use vmm_sys_util::eventfd::EventFd; use vmm_sys_util::eventfd::EventFd;
use crate::async_io::{ use crate::async_io::{
+1
View File
@@ -9,6 +9,7 @@ use std::fs::File;
use std::io::{Seek, SeekFrom}; use std::io::{Seek, SeekFrom};
use std::os::unix::io::{AsRawFd, RawFd}; use std::os::unix::io::{AsRawFd, RawFd};
use log::warn;
use vmm_sys_util::aio; use vmm_sys_util::aio;
use vmm_sys_util::eventfd::EventFd; use vmm_sys_util::eventfd::EventFd;
+1
View File
@@ -7,6 +7,7 @@ use std::fs::File;
use std::io::{Seek, SeekFrom}; use std::io::{Seek, SeekFrom};
use std::os::unix::io::{AsRawFd, RawFd}; use std::os::unix::io::{AsRawFd, RawFd};
use log::warn;
use vmm_sys_util::eventfd::EventFd; use vmm_sys_util::eventfd::EventFd;
use crate::DiskTopology; use crate::DiskTopology;
-2
View File
@@ -2,8 +2,6 @@
// //
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
extern crate log;
use std::collections::btree_map::BTreeMap; use std::collections::btree_map::BTreeMap;
use std::fs::File; use std::fs::File;
use std::io::{self, Read, Seek, SeekFrom, Write}; use std::io::{self, Read, Seek, SeekFrom, Write};