Better virtual file system, keyboard through MMIO&VirtIO
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
#[derive(Debug)]
|
||||
pub struct File {
|
||||
fd: u64,
|
||||
}
|
||||
|
||||
impl File {
|
||||
/// # Safety
|
||||
/// The file descriptor must be valid
|
||||
pub unsafe fn new(fd: u64) -> Self {
|
||||
Self { fd }
|
||||
}
|
||||
|
||||
pub fn as_fd(&self) -> u64 {
|
||||
self.fd
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user