Skip to content

Commit 140c8fe

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 fd3fad4 commit 140c8fe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ioctls/vcpu.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,11 @@ impl VcpuFd {
13781378
Ok(())
13791379
}
13801380
}
1381+
1382+
/// Get reference to the underlying vcpu file object and then get access to underlying RawFd.
1383+
pub fn vcpu_file(&self) -> &File {
1384+
&self.vcpu
1385+
}
13811386
}
13821387

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

0 commit comments

Comments
 (0)