Skip to content

Commit d9b89d5

Browse files
committed
Adds vfsconf
1 parent 781b8c8 commit d9b89d5

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

kernel-1100/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use self::file::File;
44
use self::lock::{LockObject, Mtx};
55
use self::malloc::Malloc;
6-
use self::mount::Mount;
6+
use self::mount::{Filesystem, Mount};
77
use self::pcpu::Pcpu;
88
use self::socket::Socket;
99
use self::thread::Thread;
@@ -46,6 +46,7 @@ impl okf::Kernel for Kernel {
4646
const NOCPU: u32 = 0xff;
4747

4848
type File = File;
49+
type Filesystem = Filesystem;
4950
type LockObject = LockObject;
5051
type Malloc = Malloc;
5152
type Mount = Mount;

kernel-1100/src/mount.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,9 @@ impl okf::mount::Mount<Kernel> for Mount {
2929
self.flags
3030
}
3131
}
32+
33+
/// Implementation of [`okf::mount::Filesystem`] for 11.00.
34+
#[repr(C)]
35+
pub struct Filesystem {}
36+
37+
impl okf::mount::Filesystem for Filesystem {}

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use self::fd::OpenFlags;
44
use self::file::File;
55
use self::lock::{LockObject, Mtx};
66
use self::malloc::{Malloc, MallocFlags};
7-
use self::mount::Mount;
7+
use self::mount::{Filesystem, Mount};
88
use self::pcpu::Pcpu;
99
use self::queue::TailQueue;
1010
use self::socket::{SockAddr, Socket};
@@ -54,6 +54,7 @@ pub trait Kernel: MappedKernel {
5454
const NOCPU: u32;
5555

5656
type File: File;
57+
type Filesystem: Filesystem;
5758
type LockObject: LockObject;
5859
type Malloc: Malloc;
5960
type Mount: Mount<Self>;

src/mount/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ pub trait Mount<K: Kernel>: Sized {
2424
/// [`Mount::mtx()`] must be locked.
2525
unsafe fn flags(&self) -> u64;
2626
}
27+
28+
/// Represents `vfsconf` structure.
29+
pub trait Filesystem: Sized {}

0 commit comments

Comments
 (0)