From aac28134d22a35fabca309f8149c56d60a856c02 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 15 Oct 2018 14:58:48 -0700 Subject: main: merge VirtIoDeviceInfo back into Config This was split to allow the virtio PCI transition. Now that everything is moved over, we can put the virtio configuration back into Config. BUG=None TEST=Boot crosvm on kevin and verify virtio devices still work Change-Id: I2411f5131729f84b6820aac67a92d07346f64021 Signed-off-by: Daniel Verkamp Reviewed-on: https://chromium-review.googlesource.com/1281833 Reviewed-by: Dylan Reid --- src/plugin/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/plugin/mod.rs') diff --git a/src/plugin/mod.rs b/src/plugin/mod.rs index 9f229ac..5dca8f7 100644 --- a/src/plugin/mod.rs +++ b/src/plugin/mod.rs @@ -464,7 +464,7 @@ pub fn run_config(cfg: Config) -> Result<()> { // quickly. let sigchld_fd = SignalFd::new(SIGCHLD).map_err(Error::CreateSignalFd)?; - let jail = if cfg.virtio_dev_info.multiprocess { + let jail = if cfg.multiprocess { // An empty directory for jailed plugin pivot root. let root_path = match cfg.plugin_root { Some(ref dir) => Path::new(dir), @@ -483,7 +483,7 @@ pub fn run_config(cfg: Config) -> Result<()> { return Err(Error::RootNotDir); } - let policy_path = cfg.virtio_dev_info.seccomp_policy_dir.join("plugin.policy"); + let policy_path = cfg.seccomp_policy_dir.join("plugin.policy"); let jail = create_plugin_jail(root_path, &policy_path)?; Some(jail) } else { @@ -491,9 +491,9 @@ pub fn run_config(cfg: Config) -> Result<()> { }; let mut tap_opt: Option = None; - if let Some(host_ip) = cfg.virtio_dev_info.host_ip { - if let Some(netmask) = cfg.virtio_dev_info.netmask { - if let Some(mac_address) = cfg.virtio_dev_info.mac_address { + if let Some(host_ip) = cfg.host_ip { + if let Some(netmask) = cfg.netmask { + if let Some(mac_address) = cfg.mac_address { let tap = Tap::new(false).map_err(Error::TapOpen)?; tap.set_ip_addr(host_ip).map_err(Error::TapSetIp)?; tap.set_netmask(netmask).map_err(Error::TapSetNetmask)?; -- cgit 1.4.1