Skip to content

Commit dd2974f

Browse files
committed
Adds f_mntfromname
1 parent 9ed5155 commit dd2974f

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

kernel-1100/src/mount.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ impl okf::mount::Filesystem for Filesystem {
5959
/// Implementation of [`okf::mount::FsStats`] for 11.00.
6060
#[repr(C)]
6161
pub struct FsStats {
62-
pad: [u8; 0x1d8],
62+
pad1: [u8; 0x128],
63+
mounted_from: [c_char; 88],
64+
pad2: [u8; 0x58],
6365
}
6466

65-
impl okf::mount::FsStats for FsStats {}
67+
impl okf::mount::FsStats for FsStats {
68+
fn mounted_from(&self) -> *const c_char {
69+
self.mounted_from.as_ptr()
70+
}
71+
}

src/mount/stats.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
use core::ffi::c_char;
2+
13
/// Represents `statfs` structure.
2-
pub trait FsStats: Sized {}
4+
pub trait FsStats: Sized {
5+
/// Returns `f_mntfromname`.
6+
fn mounted_from(&self) -> *const c_char;
7+
}

0 commit comments

Comments
 (0)