Skip to content

Commit 3778efe

Browse files
committed
Update assertion
Signed-off-by: Sida Chen <[email protected]>
1 parent 7283cc6 commit 3778efe

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ioctls/vm.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,9 +1406,7 @@ impl VmFd {
14061406
/// use kvm_ioctls::Cap;
14071407
///
14081408
/// let kvm = Kvm::new().unwrap();
1409-
/// assert!(
1410-
/// (kvm.check_extension_int(Cap::MemoryAttributes) as u32 & KVM_MEMORY_ATTRIBUTE_PRIVATE) == 0
1411-
/// );
1409+
/// assert!(kvm.check_extension_int(Cap::MaxVcpus) > 0);
14121410
/// ```
14131411
pub fn check_extension_int(&self, c: Cap) -> i32 {
14141412
self.check_extension_raw(c as c_ulong)
@@ -1431,7 +1429,7 @@ impl VmFd {
14311429
/// use kvm_ioctls::Cap;
14321430
///
14331431
/// let kvm = Kvm::new().unwrap();
1434-
/// assert!(kvm.check_extension_raw(Cap::GuestMemfd as c_ulong) > 0);
1432+
/// assert!(kvm.check_extension_raw(Cap::MaxVcpus as c_ulong) > 0);
14351433
/// ```
14361434
pub fn check_extension_raw(&self, c: c_ulong) -> i32 {
14371435
// SAFETY: Safe because we know that our file is a KVM fd.

0 commit comments

Comments
 (0)