Better virtual file system, keyboard through MMIO&VirtIO

This commit is contained in:
2026-03-05 14:41:28 +01:00
parent 041e544330
commit 9b6aec28f5
37 changed files with 1191 additions and 355 deletions

View File

@@ -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
}
}