mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-18 10:35:23 +00:00
vmm: seccomp: Remove unreachable patterns
Make HypervisorType enum's members conditional on build time features. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
aea1f7743b
commit
a48d7c281e
@ -61,7 +61,9 @@ pub use vm::{
|
||||
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub enum HypervisorType {
|
||||
#[cfg(feature = "kvm")]
|
||||
Kvm,
|
||||
#[cfg(feature = "mshv")]
|
||||
Mshv,
|
||||
}
|
||||
|
||||
|
@ -241,8 +241,6 @@ fn create_vmm_ioctl_seccomp_rule_hypervisor(
|
||||
HypervisorType::Kvm => create_vmm_ioctl_seccomp_rule_common_kvm(),
|
||||
#[cfg(feature = "mshv")]
|
||||
HypervisorType::Mshv => create_vmm_ioctl_seccomp_rule_common_mshv(),
|
||||
#[allow(unreachable_patterns)]
|
||||
_ => panic!("Invalid hypervisor {:?}", hypervisor_type),
|
||||
}
|
||||
}
|
||||
|
||||
@ -418,8 +416,6 @@ fn create_vmm_ioctl_seccomp_rule(
|
||||
HypervisorType::Kvm => create_vmm_ioctl_seccomp_rule_kvm(),
|
||||
#[cfg(feature = "mshv")]
|
||||
HypervisorType::Mshv => create_vmm_ioctl_seccomp_rule_mshv(),
|
||||
#[allow(unreachable_patterns)]
|
||||
_ => panic!("Invalid hypervisor {:?}", hypervisor_type),
|
||||
}
|
||||
}
|
||||
|
||||
@ -653,8 +649,6 @@ fn create_vcpu_ioctl_seccomp_rule_hypervisor(
|
||||
HypervisorType::Kvm => create_vcpu_ioctl_seccomp_rule_kvm(),
|
||||
#[cfg(feature = "mshv")]
|
||||
HypervisorType::Mshv => create_vcpu_ioctl_seccomp_rule_mshv(),
|
||||
#[allow(unreachable_patterns)]
|
||||
_ => panic!("Invalid hypervisor {:?}", hypervisor_type),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user