Skip to content

Commit ae34788

Browse files
committed
Adds vfc_name
1 parent 4c3e7fe commit ae34788

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

kernel-1100/src/mount.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use crate::lock::Mtx;
22
use crate::Kernel;
3+
use core::ffi::c_char;
34
use okf::queue::TailQueueEntry;
45

56
/// Implementation of [`okf::mount::Mount`] for 11.00.
@@ -38,6 +39,13 @@ impl okf::mount::Mount<Kernel> for Mount {
3839

3940
/// Implementation of [`okf::mount::Filesystem`] for 11.00.
4041
#[repr(C)]
41-
pub struct Filesystem {}
42+
pub struct Filesystem {
43+
pad1: [u8; 4],
44+
name: [c_char; 16],
45+
}
4246

43-
impl okf::mount::Filesystem for Filesystem {}
47+
impl okf::mount::Filesystem for Filesystem {
48+
fn name(&self) -> *const c_char {
49+
self.name.as_ptr()
50+
}
51+
}

src/mount/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use crate::queue::TailQueueEntry;
22
use crate::Kernel;
3+
use core::ffi::c_char;
34

45
/// Represents `mount` structure.
56
pub trait Mount<K: Kernel>: Sized {
@@ -29,4 +30,7 @@ pub trait Mount<K: Kernel>: Sized {
2930
}
3031

3132
/// Represents `vfsconf` structure.
32-
pub trait Filesystem: Sized {}
33+
pub trait Filesystem: Sized {
34+
/// Returns `vfc_name`.
35+
fn name(&self) -> *const c_char;
36+
}

0 commit comments

Comments
 (0)