mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
Revert "vmm: config: Implement Clone for NetConfig"
This reverts commit ea4a95c4f6
.
Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
2804608a1c
commit
8eb162e3d7
@ -1134,22 +1134,6 @@ impl NetConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clone for NetConfig {
|
|
||||||
fn clone(&self) -> Self {
|
|
||||||
NetConfig {
|
|
||||||
tap: self.tap.clone(),
|
|
||||||
vhost_socket: self.vhost_socket.clone(),
|
|
||||||
id: self.id.clone(),
|
|
||||||
fds: self
|
|
||||||
.fds
|
|
||||||
.as_ref()
|
|
||||||
// SAFETY: We have been handed these FDs through the API
|
|
||||||
.map(|fds| fds.iter().map(|fd| unsafe { libc::dup(*fd) }).collect()),
|
|
||||||
..*self
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl RngConfig {
|
impl RngConfig {
|
||||||
pub fn parse(rng: &str) -> Result<Self> {
|
pub fn parse(rng: &str) -> Result<Self> {
|
||||||
let mut parser = OptionParser::new();
|
let mut parser = OptionParser::new();
|
||||||
|
@ -183,7 +183,7 @@ impl Default for MemoryConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize, Default)]
|
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize, Default)]
|
||||||
pub enum VhostMode {
|
pub enum VhostMode {
|
||||||
#[default]
|
#[default]
|
||||||
Client,
|
Client,
|
||||||
@ -248,7 +248,7 @@ impl Default for DiskConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq, Deserialize, Serialize)]
|
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
|
||||||
pub struct NetConfig {
|
pub struct NetConfig {
|
||||||
#[serde(default = "default_netconfig_tap")]
|
#[serde(default = "default_netconfig_tap")]
|
||||||
pub tap: Option<String>,
|
pub tap: Option<String>,
|
||||||
|
Loading…
Reference in New Issue
Block a user