Skip to content

Commit

Permalink
Adds dirent
Browse files Browse the repository at this point in the history
  • Loading branch information
ultimaweapon committed Nov 12, 2024
1 parent 8e3461c commit 5cefe0a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/vnode/dirent.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use core::ffi::c_char;

/// Represents `dirent` structure.
#[repr(C)]
pub struct DirEnt<const L: usize> {
pub id: u32, // d_fileno
pub len: u16, // d_reclen
pub ty: u8, // d_type
pub name_len: u8, // d_namlen
pub name: [c_char; L], // d_name
}
2 changes: 2 additions & 0 deletions src/vnode/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
pub use self::dirent::*;
pub use self::op::*;
use crate::Kernel;
use core::ffi::c_int;

mod dirent;
mod op;

/// Represents `vnode` structure.
Expand Down

0 comments on commit 5cefe0a

Please sign in to comment.