Skip to content

Commit 462e32c

Browse files
committed
Add access method VcpuFd::vcpu_file()
Add access method VcpuFd::vcpu_file() and also export new_vmfd(). Signed-off-by: Liu Jiang <[email protected]>
1 parent 6768c7c commit 462e32c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ioctls/vcpu.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1394,6 +1394,11 @@ impl VcpuFd {
13941394
Ok(())
13951395
}
13961396
}
1397+
1398+
/// Get reference to the underlying vcpu file object and then get access to underlying RawFd.
1399+
pub fn vcpu_file(&self) -> &File {
1400+
&self.vcpu
1401+
}
13971402
}
13981403

13991404
/// Helper function to create a new `VcpuFd`.

0 commit comments

Comments
 (0)