mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-21 20:15:21 +00:00
build: Address issues found by 1.43.0 clippy
These are mostly due to use of "bare use" statements and unnecessary vector creation. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
fbd1a6c5f1
commit
c31ad72ee9
@ -6,7 +6,6 @@
|
||||
// found in the THIRD-PARTY file.
|
||||
|
||||
use super::{create_sockaddr, create_socket, Error as NetUtilError, MacAddr};
|
||||
use libc;
|
||||
use net_gen;
|
||||
use std::fs::File;
|
||||
use std::io::{Error as IoError, Read, Result as IoResult, Write};
|
||||
|
@ -8,7 +8,6 @@ use crate::configuration::{
|
||||
use crate::device::{DeviceRelocation, Error as PciDeviceError, PciDevice};
|
||||
use byteorder::{ByteOrder, LittleEndian};
|
||||
use devices::BusDevice;
|
||||
use std;
|
||||
use std::any::Any;
|
||||
use std::collections::HashMap;
|
||||
use std::ops::DerefMut;
|
||||
|
@ -2,7 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE-BSD-3-Clause file.
|
||||
|
||||
use std;
|
||||
use std::fmt::{self, Display};
|
||||
use std::io;
|
||||
|
||||
|
@ -10,7 +10,6 @@ extern crate vhost_user_backend;
|
||||
extern crate vm_virtio;
|
||||
|
||||
use clap::{App, Arg};
|
||||
use epoll;
|
||||
use futures::executor::{ThreadPool, ThreadPoolBuilder};
|
||||
use libc::EFD_NONBLOCK;
|
||||
use log::*;
|
||||
|
@ -13,7 +13,6 @@ extern crate vhost_rs;
|
||||
extern crate vhost_user_backend;
|
||||
extern crate vm_virtio;
|
||||
|
||||
use epoll;
|
||||
use libc::EFD_NONBLOCK;
|
||||
use log::*;
|
||||
use qcow::{self, ImageType, QcowFile};
|
||||
|
@ -563,7 +563,7 @@ mod tests {
|
||||
use DescriptorType::*;
|
||||
|
||||
let memory_start_addr = GuestAddress(0x0);
|
||||
let memory = GuestMemoryMmap::from_ranges(&vec![(memory_start_addr, 0x10000)]).unwrap();
|
||||
let memory = GuestMemoryMmap::from_ranges(&[(memory_start_addr, 0x10000)]).unwrap();
|
||||
|
||||
let chain = create_descriptor_chain(
|
||||
&memory,
|
||||
@ -583,15 +583,15 @@ mod tests {
|
||||
assert_eq!(reader.bytes_read(), 0);
|
||||
|
||||
let mut buffer = [0 as u8; 64];
|
||||
if let Err(_) = reader.read_exact(&mut buffer) {
|
||||
panic!("read_exact should not fail here");
|
||||
if let Err(e) = reader.read_exact(&mut buffer) {
|
||||
panic!("read_exact should not fail here: {:?}", e);
|
||||
}
|
||||
|
||||
assert_eq!(reader.available_bytes(), 42);
|
||||
assert_eq!(reader.bytes_read(), 64);
|
||||
|
||||
match reader.read(&mut buffer) {
|
||||
Err(_) => panic!("read should not fail here"),
|
||||
Err(e) => panic!("read should not fail here: {:?}", e),
|
||||
Ok(length) => assert_eq!(length, 42),
|
||||
}
|
||||
|
||||
@ -604,7 +604,7 @@ mod tests {
|
||||
use DescriptorType::*;
|
||||
|
||||
let memory_start_addr = GuestAddress(0x0);
|
||||
let memory = GuestMemoryMmap::from_ranges(&vec![(memory_start_addr, 0x10000)]).unwrap();
|
||||
let memory = GuestMemoryMmap::from_ranges(&[(memory_start_addr, 0x10000)]).unwrap();
|
||||
|
||||
let chain = create_descriptor_chain(
|
||||
&memory,
|
||||
@ -623,16 +623,16 @@ mod tests {
|
||||
assert_eq!(writer.available_bytes(), 106);
|
||||
assert_eq!(writer.bytes_written(), 0);
|
||||
|
||||
let mut buffer = [0 as u8; 64];
|
||||
if let Err(_) = writer.write_all(&mut buffer) {
|
||||
panic!("write_all should not fail here");
|
||||
let buffer = [0 as u8; 64];
|
||||
if let Err(e) = writer.write_all(&buffer) {
|
||||
panic!("write_all should not fail here: {:?}", e);
|
||||
}
|
||||
|
||||
assert_eq!(writer.available_bytes(), 42);
|
||||
assert_eq!(writer.bytes_written(), 64);
|
||||
|
||||
match writer.write(&mut buffer) {
|
||||
Err(_) => panic!("write should not fail here"),
|
||||
match writer.write(&buffer) {
|
||||
Err(e) => panic!("write should not fail here {:?}", e),
|
||||
Ok(length) => assert_eq!(length, 42),
|
||||
}
|
||||
|
||||
@ -645,7 +645,7 @@ mod tests {
|
||||
use DescriptorType::*;
|
||||
|
||||
let memory_start_addr = GuestAddress(0x0);
|
||||
let memory = GuestMemoryMmap::from_ranges(&vec![(memory_start_addr, 0x10000)]).unwrap();
|
||||
let memory = GuestMemoryMmap::from_ranges(&[(memory_start_addr, 0x10000)]).unwrap();
|
||||
|
||||
let chain = create_descriptor_chain(
|
||||
&memory,
|
||||
@ -670,7 +670,7 @@ mod tests {
|
||||
use DescriptorType::*;
|
||||
|
||||
let memory_start_addr = GuestAddress(0x0);
|
||||
let memory = GuestMemoryMmap::from_ranges(&vec![(memory_start_addr, 0x10000)]).unwrap();
|
||||
let memory = GuestMemoryMmap::from_ranges(&[(memory_start_addr, 0x10000)]).unwrap();
|
||||
|
||||
let chain = create_descriptor_chain(
|
||||
&memory,
|
||||
@ -695,7 +695,7 @@ mod tests {
|
||||
use DescriptorType::*;
|
||||
|
||||
let memory_start_addr = GuestAddress(0x0);
|
||||
let memory = GuestMemoryMmap::from_ranges(&vec![(memory_start_addr, 0x10000)]).unwrap();
|
||||
let memory = GuestMemoryMmap::from_ranges(&[(memory_start_addr, 0x10000)]).unwrap();
|
||||
|
||||
let chain = create_descriptor_chain(
|
||||
&memory,
|
||||
@ -743,9 +743,9 @@ mod tests {
|
||||
use DescriptorType::*;
|
||||
|
||||
let memory_start_addr = GuestAddress(0x0);
|
||||
let memory = GuestMemoryMmap::from_ranges(&vec![(memory_start_addr, 0x10000)]).unwrap();
|
||||
let memory = GuestMemoryMmap::from_ranges(&[(memory_start_addr, 0x10000)]).unwrap();
|
||||
|
||||
let secret: Le32 = 0x12345678.into();
|
||||
let secret: Le32 = 0x1234_5678.into();
|
||||
|
||||
// Create a descriptor chain with memory regions that are properly separated.
|
||||
let chain_writer = create_descriptor_chain(
|
||||
@ -757,8 +757,8 @@ mod tests {
|
||||
)
|
||||
.expect("create_descriptor_chain failed");
|
||||
let mut writer = Writer::new(&memory, chain_writer).expect("failed to create Writer");
|
||||
if let Err(_) = writer.write_obj(secret) {
|
||||
panic!("write_obj should not fail here");
|
||||
if let Err(e) = writer.write_obj(secret) {
|
||||
panic!("write_obj should not fail here: {:?}", e);
|
||||
}
|
||||
|
||||
// Now create new descriptor chain pointing to the same memory and try to read it.
|
||||
@ -772,7 +772,7 @@ mod tests {
|
||||
.expect("create_descriptor_chain failed");
|
||||
let mut reader = Reader::new(&memory, chain_reader).expect("failed to create Reader");
|
||||
match reader.read_obj::<Le32>() {
|
||||
Err(_) => panic!("read_obj should not fail here"),
|
||||
Err(e) => panic!("read_obj should not fail here: {:?}", e),
|
||||
Ok(read_secret) => assert_eq!(read_secret, secret),
|
||||
}
|
||||
}
|
||||
@ -782,7 +782,7 @@ mod tests {
|
||||
use DescriptorType::*;
|
||||
|
||||
let memory_start_addr = GuestAddress(0x0);
|
||||
let memory = GuestMemoryMmap::from_ranges(&vec![(memory_start_addr, 0x10000)]).unwrap();
|
||||
let memory = GuestMemoryMmap::from_ranges(&[(memory_start_addr, 0x10000)]).unwrap();
|
||||
|
||||
let chain = create_descriptor_chain(
|
||||
&memory,
|
||||
@ -795,8 +795,7 @@ mod tests {
|
||||
|
||||
let mut reader = Reader::new(&memory, chain).expect("failed to create Reader");
|
||||
|
||||
let mut buf = Vec::with_capacity(1024);
|
||||
buf.resize(1024, 0);
|
||||
let mut buf = vec![0; 1024];
|
||||
|
||||
assert_eq!(
|
||||
reader
|
||||
@ -812,7 +811,7 @@ mod tests {
|
||||
use DescriptorType::*;
|
||||
|
||||
let memory_start_addr = GuestAddress(0x0);
|
||||
let memory = GuestMemoryMmap::from_ranges(&vec![(memory_start_addr, 0x10000)]).unwrap();
|
||||
let memory = GuestMemoryMmap::from_ranges(&[(memory_start_addr, 0x10000)]).unwrap();
|
||||
|
||||
let chain = create_descriptor_chain(
|
||||
&memory,
|
||||
@ -841,7 +840,7 @@ mod tests {
|
||||
use DescriptorType::*;
|
||||
|
||||
let memory_start_addr = GuestAddress(0x0);
|
||||
let memory = GuestMemoryMmap::from_ranges(&vec![(memory_start_addr, 0x10000)]).unwrap();
|
||||
let memory = GuestMemoryMmap::from_ranges(&[(memory_start_addr, 0x10000)]).unwrap();
|
||||
|
||||
let chain = create_descriptor_chain(
|
||||
&memory,
|
||||
@ -870,7 +869,7 @@ mod tests {
|
||||
use DescriptorType::*;
|
||||
|
||||
let memory_start_addr = GuestAddress(0x0);
|
||||
let memory = GuestMemoryMmap::from_ranges(&vec![(memory_start_addr, 0x10000)]).unwrap();
|
||||
let memory = GuestMemoryMmap::from_ranges(&[(memory_start_addr, 0x10000)]).unwrap();
|
||||
|
||||
let chain = create_descriptor_chain(
|
||||
&memory,
|
||||
@ -899,7 +898,7 @@ mod tests {
|
||||
use DescriptorType::*;
|
||||
|
||||
let memory_start_addr = GuestAddress(0x0);
|
||||
let memory = GuestMemoryMmap::from_ranges(&vec![(memory_start_addr, 0x10000)]).unwrap();
|
||||
let memory = GuestMemoryMmap::from_ranges(&[(memory_start_addr, 0x10000)]).unwrap();
|
||||
|
||||
let chain = create_descriptor_chain(
|
||||
&memory,
|
||||
@ -928,7 +927,7 @@ mod tests {
|
||||
use DescriptorType::*;
|
||||
|
||||
let memory_start_addr = GuestAddress(0x0);
|
||||
let memory = GuestMemoryMmap::from_ranges(&vec![(memory_start_addr, 0x10000)]).unwrap();
|
||||
let memory = GuestMemoryMmap::from_ranges(&[(memory_start_addr, 0x10000)]).unwrap();
|
||||
|
||||
let chain = create_descriptor_chain(
|
||||
&memory,
|
||||
@ -947,7 +946,7 @@ mod tests {
|
||||
.expect("create_descriptor_chain failed");
|
||||
let mut reader = Reader::new(&memory, chain).expect("failed to create Reader");
|
||||
|
||||
if let Ok(_) = reader.split_at(256) {
|
||||
if reader.split_at(256).is_ok() {
|
||||
panic!("successfully split Reader with out of bounds offset");
|
||||
}
|
||||
}
|
||||
@ -957,7 +956,7 @@ mod tests {
|
||||
use DescriptorType::*;
|
||||
|
||||
let memory_start_addr = GuestAddress(0x0);
|
||||
let memory = GuestMemoryMmap::from_ranges(&vec![(memory_start_addr, 0x10000)]).unwrap();
|
||||
let memory = GuestMemoryMmap::from_ranges(&[(memory_start_addr, 0x10000)]).unwrap();
|
||||
|
||||
let chain = create_descriptor_chain(
|
||||
&memory,
|
||||
@ -981,7 +980,7 @@ mod tests {
|
||||
use DescriptorType::*;
|
||||
|
||||
let memory_start_addr = GuestAddress(0x0);
|
||||
let memory = GuestMemoryMmap::from_ranges(&vec![(memory_start_addr, 0x10000)]).unwrap();
|
||||
let memory = GuestMemoryMmap::from_ranges(&[(memory_start_addr, 0x10000)]).unwrap();
|
||||
|
||||
let chain = create_descriptor_chain(
|
||||
&memory,
|
||||
|
@ -9,8 +9,6 @@ use std::io;
|
||||
use std::mem;
|
||||
use std::time::Duration;
|
||||
|
||||
use libc;
|
||||
|
||||
use crate::fuse;
|
||||
|
||||
use super::fs_cache_req_handler::FsCacheReqHandler;
|
||||
|
@ -5,7 +5,6 @@
|
||||
use std::mem;
|
||||
|
||||
use bitflags::bitflags;
|
||||
use libc;
|
||||
use vm_memory::ByteValued;
|
||||
|
||||
/// Version number of this interface.
|
||||
|
@ -2,6 +2,13 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
use super::fs_cache_req_handler::FsCacheReqHandler;
|
||||
use crate::filesystem::{
|
||||
Context, DirEntry, Entry, FileSystem, FsOptions, GetxattrReply, ListxattrReply, OpenOptions,
|
||||
SetattrValid, ZeroCopyReader, ZeroCopyWriter,
|
||||
};
|
||||
use crate::fuse;
|
||||
use crate::multikey::MultikeyBTreeMap;
|
||||
use std::collections::btree_map;
|
||||
use std::collections::BTreeMap;
|
||||
use std::ffi::{CStr, CString};
|
||||
@ -13,18 +20,8 @@ use std::str::FromStr;
|
||||
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::time::Duration;
|
||||
|
||||
use libc;
|
||||
use vm_memory::ByteValued;
|
||||
|
||||
use super::fs_cache_req_handler::FsCacheReqHandler;
|
||||
use crate::filesystem::{
|
||||
Context, DirEntry, Entry, FileSystem, FsOptions, GetxattrReply, ListxattrReply, OpenOptions,
|
||||
SetattrValid, ZeroCopyReader, ZeroCopyWriter,
|
||||
};
|
||||
use crate::fuse;
|
||||
use crate::multikey::MultikeyBTreeMap;
|
||||
|
||||
const CURRENT_DIR_CSTR: &[u8] = b".\0";
|
||||
const PARENT_DIR_CSTR: &[u8] = b"..\0";
|
||||
const EMPTY_CSTR: &[u8] = b"\0";
|
||||
|
@ -2,15 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
use std::convert::TryInto;
|
||||
use std::ffi::CStr;
|
||||
use std::fs::File;
|
||||
use std::io::{self, Read, Write};
|
||||
use std::mem::size_of;
|
||||
|
||||
use libc;
|
||||
use vm_memory::ByteValued;
|
||||
|
||||
use super::fs_cache_req_handler::FsCacheReqHandler;
|
||||
use crate::descriptor_utils::{Reader, Writer};
|
||||
use crate::filesystem::{
|
||||
@ -19,6 +10,12 @@ use crate::filesystem::{
|
||||
};
|
||||
use crate::fuse::*;
|
||||
use crate::{Error, Result};
|
||||
use std::convert::TryInto;
|
||||
use std::ffi::CStr;
|
||||
use std::fs::File;
|
||||
use std::io::{self, Read, Write};
|
||||
use std::mem::size_of;
|
||||
use vm_memory::ByteValued;
|
||||
|
||||
const MAX_BUFFER_SIZE: u32 = 1 << 20;
|
||||
const DIRENT_PADDING: [u8; 8] = [0; 8];
|
||||
|
@ -13,7 +13,6 @@ extern crate vhost_user_backend;
|
||||
extern crate vm_virtio;
|
||||
extern crate vmm;
|
||||
|
||||
use epoll;
|
||||
use libc::{self, EAGAIN, EFD_NONBLOCK};
|
||||
use log::*;
|
||||
use net_util::{MacAddr, Tap};
|
||||
|
@ -15,7 +15,6 @@ use super::{
|
||||
};
|
||||
use crate::VirtioInterrupt;
|
||||
use anyhow::anyhow;
|
||||
use epoll;
|
||||
use libc::{c_void, EFD_NONBLOCK};
|
||||
use serde::ser::{Serialize, SerializeStruct, Serializer};
|
||||
use std::alloc::{alloc_zeroed, dealloc, Layout};
|
||||
|
@ -8,10 +8,8 @@ use super::{
|
||||
};
|
||||
use crate::VirtioInterrupt;
|
||||
use anyhow::anyhow;
|
||||
use epoll;
|
||||
use libc::EFD_NONBLOCK;
|
||||
use serde::ser::{Serialize, SerializeStruct, Serializer};
|
||||
use std;
|
||||
use std::cmp;
|
||||
use std::collections::VecDeque;
|
||||
use std::fs::File;
|
||||
|
@ -9,7 +9,6 @@ use super::{
|
||||
};
|
||||
use crate::{DmaRemapping, VirtioInterrupt, VirtioInterruptType};
|
||||
use anyhow::anyhow;
|
||||
use epoll;
|
||||
use libc::EFD_NONBLOCK;
|
||||
use std::cmp;
|
||||
use std::collections::BTreeMap;
|
||||
|
@ -18,8 +18,6 @@ use super::{
|
||||
VirtioDeviceType, VIRTIO_F_VERSION_1,
|
||||
};
|
||||
use crate::{VirtioInterrupt, VirtioInterruptType};
|
||||
use epoll;
|
||||
use libc;
|
||||
use libc::EFD_NONBLOCK;
|
||||
use std::cmp;
|
||||
use std::fs::File;
|
||||
|
@ -16,7 +16,6 @@ use super::{
|
||||
};
|
||||
use crate::VirtioInterrupt;
|
||||
use anyhow::anyhow;
|
||||
use epoll;
|
||||
use libc::EAGAIN;
|
||||
use libc::EFD_NONBLOCK;
|
||||
use net_util::{MacAddr, Tap};
|
||||
|
@ -13,7 +13,6 @@ use super::{
|
||||
};
|
||||
use crate::{VirtioInterrupt, VirtioInterruptType};
|
||||
use anyhow::anyhow;
|
||||
use epoll;
|
||||
use libc::EFD_NONBLOCK;
|
||||
use serde::ser::{Serialize, SerializeStruct, Serializer};
|
||||
use std::cmp;
|
||||
|
@ -9,9 +9,7 @@ use super::{
|
||||
};
|
||||
use crate::{VirtioInterrupt, VirtioInterruptType};
|
||||
use anyhow::anyhow;
|
||||
use epoll;
|
||||
use libc::EFD_NONBLOCK;
|
||||
use std;
|
||||
use std::fs::File;
|
||||
use std::io;
|
||||
use std::os::unix::io::{AsRawFd, FromRawFd};
|
||||
|
@ -8,7 +8,6 @@ use super::Error as DeviceError;
|
||||
use super::{Error, Result};
|
||||
use crate::block::VirtioBlockConfig;
|
||||
use crate::VirtioInterrupt;
|
||||
use libc;
|
||||
use libc::EFD_NONBLOCK;
|
||||
use std::cmp;
|
||||
use std::io::Write;
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
use super::super::{Queue, VirtioInterruptType};
|
||||
use super::{Error, Result};
|
||||
use epoll;
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
|
||||
use crate::VirtioInterrupt;
|
||||
|
@ -7,7 +7,6 @@ extern crate vhost_rs;
|
||||
extern crate virtio_bindings;
|
||||
extern crate vm_memory;
|
||||
|
||||
use std;
|
||||
use std::io;
|
||||
use vhost_rs::Error as VhostError;
|
||||
use vm_memory::Error as MmapError;
|
||||
|
@ -11,7 +11,6 @@ use super::vu_common_ctrl::*;
|
||||
use super::Error as DeviceError;
|
||||
use super::{Error, Result};
|
||||
use crate::VirtioInterrupt;
|
||||
use libc;
|
||||
use libc::EFD_NONBLOCK;
|
||||
use net_util::MacAddr;
|
||||
use std::cmp;
|
||||
|
@ -1,25 +1,21 @@
|
||||
// Copyright 2019 Intel Corporation. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use libc;
|
||||
use super::super::Queue;
|
||||
use super::{Error, Result};
|
||||
use crate::queue::Descriptor;
|
||||
use crate::{VirtioInterrupt, VirtioInterruptType};
|
||||
use libc::EFD_NONBLOCK;
|
||||
use std::convert::TryInto;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use std::sync::Arc;
|
||||
use std::vec::Vec;
|
||||
|
||||
use crate::queue::Descriptor;
|
||||
use crate::{VirtioInterrupt, VirtioInterruptType};
|
||||
|
||||
use vhost_rs::vhost_user::{Master, VhostUserMaster};
|
||||
use vhost_rs::{VhostBackend, VhostUserMemoryRegionInfo, VringConfigData};
|
||||
use vm_device::get_host_address_range;
|
||||
use vm_memory::{Address, Error as MmapError, GuestMemory, GuestMemoryMmap, GuestMemoryRegion};
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
|
||||
use super::super::Queue;
|
||||
use super::{Error, Result};
|
||||
use vhost_rs::vhost_user::{Master, VhostUserMaster};
|
||||
use vhost_rs::{VhostBackend, VhostUserMemoryRegionInfo, VringConfigData};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct VhostUserConfig {
|
||||
pub sock: String,
|
||||
|
@ -36,9 +36,7 @@ use anyhow::anyhow;
|
||||
/// - a backend FD.
|
||||
///
|
||||
use byteorder::{ByteOrder, LittleEndian};
|
||||
use epoll;
|
||||
use libc::EFD_NONBLOCK;
|
||||
use std;
|
||||
use std::fs::File;
|
||||
use std::io;
|
||||
use std::os::unix::io::{AsRawFd, FromRawFd};
|
||||
@ -688,15 +686,13 @@ mod tests {
|
||||
VirtioDeviceType::TYPE_VSOCK as u32
|
||||
);
|
||||
assert_eq!(ctx.device.queue_max_sizes(), QUEUE_SIZES);
|
||||
assert_eq!((ctx.device.features() >> (0 * 32)) as u32, device_pages[0]);
|
||||
assert_eq!((ctx.device.features() >> (1 * 32)) as u32, device_pages[1]);
|
||||
assert_eq!(ctx.device.features() as u32, device_pages[0]);
|
||||
assert_eq!((ctx.device.features() >> 32) as u32, device_pages[1]);
|
||||
|
||||
// Ack device features, page 0.
|
||||
ctx.device
|
||||
.ack_features(u64::from(driver_pages[0]) << (0 * 32));
|
||||
ctx.device.ack_features(u64::from(driver_pages[0]));
|
||||
// Ack device features, page 1.
|
||||
ctx.device
|
||||
.ack_features(u64::from(driver_pages[1]) << (1 * 32));
|
||||
ctx.device.ack_features(u64::from(driver_pages[1]) << 32);
|
||||
// Check that no side effect are present, and that the acked features are exactly the same
|
||||
// as the device features.
|
||||
assert_eq!(ctx.device.acked_features, device_features & driver_features);
|
||||
|
@ -4,7 +4,6 @@
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use libc;
|
||||
use seccomp::{
|
||||
allow_syscall, allow_syscall_if, BpfProgram, Error, SeccompAction, SeccompCmpArgLen as ArgLen,
|
||||
SeccompCmpOp::Eq, SeccompCondition as Cond, SeccompError, SeccompFilter, SeccompLevel,
|
||||
|
Loading…
x
Reference in New Issue
Block a user