mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: merge qcow, vhdx and block_util into block crate
This commit merges crates `qcow`, `vhdx` and `block_util` into the crate `block`, which can allow `qcow` to use functions from `block_util` without introducing a circular crate dependency. This commit is based on crosvm implementation: https://chromium.googlesource.com/crosvm/crosvm/+/f2eecc4152eca8d395566cffa2c102ec090a152d Signed-off-by: Yu Li <liyu.yukiteru@bytedance.com>
This commit is contained in:
@@ -7,13 +7,12 @@ build = "../build.rs"
|
||||
|
||||
[dependencies]
|
||||
argh = "0.1.9"
|
||||
block_util = { path = "../block_util" }
|
||||
block = { path = "../block" }
|
||||
env_logger = "0.10.0"
|
||||
epoll = "4.3.3"
|
||||
libc = "0.2.139"
|
||||
log = "0.4.17"
|
||||
option_parser = { path = "../option_parser" }
|
||||
qcow = { path = "../qcow" }
|
||||
vhost = { version = "0.7.0", features = ["vhost-user-slave"] }
|
||||
vhost-user-backend = "0.9.0"
|
||||
virtio-bindings = "0.2.0"
|
||||
|
||||
@@ -8,11 +8,14 @@
|
||||
//
|
||||
// SPDX-License-Identifier: (Apache-2.0 AND BSD-3-Clause)
|
||||
|
||||
use block_util::{build_disk_image_id, Request, VirtioBlockConfig};
|
||||
use block::{
|
||||
build_disk_image_id,
|
||||
qcow::{self, ImageType, QcowFile},
|
||||
Request, VirtioBlockConfig,
|
||||
};
|
||||
use libc::EFD_NONBLOCK;
|
||||
use log::*;
|
||||
use option_parser::{OptionParser, OptionParserError, Toggle};
|
||||
use qcow::{self, ImageType, QcowFile};
|
||||
use std::fs::File;
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::Read;
|
||||
|
||||
Reference in New Issue
Block a user