vhost_user_net, vhost_user_block, option_parser: Remove vmm dependency

Remove the vmm dependency from vhost_user_block and vhost_user_net where
it was existing to use config::OptionParser. By moving the OptionParser
to its own crate at the top-level we can remove the very heavy
dependency that these vhost-user backends had.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-07-06 16:41:45 +01:00
parent 90261bb9c7
commit b69f6d4f6c
11 changed files with 192 additions and 172 deletions

View File

@@ -15,6 +15,7 @@ extern crate virtio_devices;
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;
@@ -40,7 +41,6 @@ use virtio_devices::block::{build_disk_image_id, Request};
use virtio_devices::VirtioBlockConfig;
use vm_memory::ByteValued;
use vm_memory::{Bytes, GuestMemoryMmap};
use vmm::config::{OptionParser, OptionParserError, Toggle};
use vmm_sys_util::eventfd::EventFd;
const SECTOR_SHIFT: u8 = 9;