mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: generic vhost-user: add support
Add VMM support for generic vhost-user devices. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
committed by
Rob Bradford
parent
8c618ff5e0
commit
085a7a49fa
@@ -4,6 +4,7 @@
|
||||
//
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::fmt::{Display, Write};
|
||||
use std::num::ParseIntError;
|
||||
use std::str::FromStr;
|
||||
|
||||
@@ -240,6 +241,21 @@ impl FromStr for ByteSized {
|
||||
|
||||
pub struct IntegerList(pub Vec<u64>);
|
||||
|
||||
impl Display for IntegerList {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.write_char('[')?;
|
||||
let mut iter = self.0.iter();
|
||||
if let Some(first) = iter.next() {
|
||||
first.fmt(f)?;
|
||||
for i in iter {
|
||||
f.write_char(',')?;
|
||||
i.fmt(f)?;
|
||||
}
|
||||
}
|
||||
f.write_char(']')
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum IntegerListParseError {
|
||||
#[error("invalid value: {0}")]
|
||||
|
||||
Reference in New Issue
Block a user