Skip to content

Commit

Permalink
Add access method VcpuFd::vcpu_file()
Browse files Browse the repository at this point in the history
Add access method VcpuFd::vcpu_file() and also export new_vmfd().

Signed-off-by: Liu Jiang <[email protected]>
  • Loading branch information
jiangliu committed Jun 11, 2021
1 parent 6768c7c commit 462e32c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ioctls/vcpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,11 @@ impl VcpuFd {
Ok(())
}
}

/// Get reference to the underlying vcpu file object and then get access to underlying RawFd.
pub fn vcpu_file(&self) -> &File {
&self.vcpu
}
}

/// Helper function to create a new `VcpuFd`.
Expand Down

0 comments on commit 462e32c

Please sign in to comment.