Skip to content

Commit a4d1e93

Browse files
dianpopadpopa
authored and
dpopa
committed
kvm: remove unnecesary warn! from KVM_CAP_NR_VCPUS
Not necessary to throw a warning when the ioctl return error (see qemu). Signed-off-by: Diana Popa <[email protected]>
1 parent fd7dabb commit a4d1e93

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

kvm/src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ extern crate libc;
88

99
extern crate byteorder;
1010
extern crate kvm_sys;
11-
#[macro_use]
1211
extern crate sys_util;
1312

1413
mod cap;
@@ -79,12 +78,8 @@ impl Kvm {
7978
/// Gets the recommended maximum number of VCPUs per VM.
8079
pub fn get_nr_vcpus(&self) -> usize {
8180
match self.check_extension_int(Cap::NrVcpus) {
82-
0 => 4, // according to api.txt
8381
x if x > 0 => x as usize,
84-
_ => {
85-
warn!("kernel returned invalid number of VCPUs");
86-
4
87-
}
82+
_ => 4,
8883
}
8984
}
9085

0 commit comments

Comments
 (0)