summary refs log tree commit diff
path: root/arch/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Verkamp <dverkamp@chromium.org>2018-09-20 10:59:06 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-10-01 11:30:00 -0700
commitc5a6762081979e3a1e16028a6542deda27465534 (patch)
tree2a24f14708c87648bc1ba246b59a677d0691b534 /arch/src/lib.rs
parent4f228cb2033b8e8bf94864574b37fe719b1a7930 (diff)
downloadcrosvm-c5a6762081979e3a1e16028a6542deda27465534.tar
crosvm-c5a6762081979e3a1e16028a6542deda27465534.tar.gz
crosvm-c5a6762081979e3a1e16028a6542deda27465534.tar.bz2
crosvm-c5a6762081979e3a1e16028a6542deda27465534.tar.lz
crosvm-c5a6762081979e3a1e16028a6542deda27465534.tar.xz
crosvm-c5a6762081979e3a1e16028a6542deda27465534.tar.zst
crosvm-c5a6762081979e3a1e16028a6542deda27465534.zip
devices: pci: add keep_fds to PciDevice
PciDevice implementations will have file descriptors that need to be
preserved across the minijail fork.

Change-Id: I0b1f5b827b55c4d8960ffa95331b82f9c692f304
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1237359
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'arch/src/lib.rs')
-rw-r--r--arch/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/src/lib.rs b/arch/src/lib.rs
index 6cd4dde..807a4df 100644
--- a/arch/src/lib.rs
+++ b/arch/src/lib.rs
@@ -142,7 +142,7 @@ pub fn generate_pci_root(devices: Vec<(Box<PciDevice + 'static>, Minijail)>,
     let mut root = PciRoot::new();
     let mut pci_irqs = Vec::new();
     for (dev_idx, (mut device, jail)) in devices.into_iter().enumerate() {
-        let mut keep_fds = Vec::new();
+        let mut keep_fds = device.keep_fds();
         syslog::push_fds(&mut keep_fds);
 
         let irqfd = EventFd::new().map_err(DeviceRegistrationError::EventFdCreate)?;