Skip to content

Commit f307415

Browse files
committed
Adds v_type
1 parent f48a5b2 commit f307415

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

kernel-1100/src/vnode.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@ use okf::Kernel;
66
/// Implementation of [`okf::vnode::Vnode`] for 11.00.
77
#[repr(C)]
88
pub struct Vnode {
9-
pad1: [u8; 0x10],
9+
ty: c_int,
10+
pad1: [u8; 0xC],
1011
ops: *mut VopVector,
1112
}
1213

1314
impl okf::vnode::Vnode<crate::Kernel> for Vnode {
15+
fn ty(&self) -> c_int {
16+
self.ty
17+
}
18+
1419
fn ops(&self) -> *mut VopVector {
1520
self.ops
1621
}

src/vnode/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
pub use self::op::*;
22
use crate::Kernel;
3+
use core::ffi::c_int;
34

45
mod op;
56

67
/// Represents `vnode` structure.
78
pub trait Vnode<K: Kernel>: Sized {
9+
/// Returns `v_type`.
10+
fn ty(&self) -> c_int;
11+
812
/// Returns `v_op`.
913
fn ops(&self) -> *mut K::VopVector;
1014
}

0 commit comments

Comments
 (0)