mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2026-01-03 15:58:37 +00:00
[i2c] separate imports
We've typically separated imports in 3 categories: - Rust standard library - external crates - project internal imports (such as imports from user defined modules) Signed-off-by: Andreea Florescu <fandree@amazon.com>
This commit is contained in:
parent
850cbce112
commit
1a9b9e3fd6
@ -5,9 +5,10 @@
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use libc::{c_ulong, ioctl, EADDRINUSE, EADDRNOTAVAIL, EINVAL};
|
||||
use std::fs::{File, OpenOptions};
|
||||
use std::os::unix::io::AsRawFd;
|
||||
|
||||
use libc::{c_ulong, ioctl, EADDRINUSE, EADDRNOTAVAIL, EINVAL};
|
||||
use vmm_sys_util::errno::{errno_result, Error, Result};
|
||||
|
||||
// The type of the `req` parameter is different for the `musl` library. This will enable
|
||||
|
||||
@ -8,15 +8,19 @@
|
||||
mod i2c;
|
||||
mod vhu_i2c;
|
||||
|
||||
use clap::{load_yaml, App, ArgMatches};
|
||||
use i2c::{I2cAdapter, I2cAdapterTrait, I2cMap};
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::thread::spawn;
|
||||
|
||||
use clap::{load_yaml, App, ArgMatches};
|
||||
use vhost::{vhost_user, vhost_user::Listener};
|
||||
use vhost_user_backend::VhostUserDaemon;
|
||||
use vhu_i2c::VhostUserI2cBackend;
|
||||
use vm_memory::{GuestMemoryAtomic, GuestMemoryMmap};
|
||||
|
||||
use i2c::{I2cAdapter, I2cAdapterTrait, I2cMap};
|
||||
use std::convert::TryFrom;
|
||||
use std::num::ParseIntError;
|
||||
use vhu_i2c::VhostUserI2cBackend;
|
||||
|
||||
fn start_daemon<T: I2cAdapterTrait>(
|
||||
backend: Arc<RwLock<VhostUserI2cBackend<T>>>,
|
||||
listener: Listener,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user