Skip to content

Commit 9852b9e

Browse files
ZizhengBianeryugey
authored andcommitted
vfs: add method to export root pseudofs's reference
In some scenario, we need to access root pseudofs's method in outer caller, so we add a method to export its reference in this patch. Signed-off-by: Zizheng Bian <[email protected]>
1 parent 116ba46 commit 9852b9e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/api/vfs/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,11 @@ impl Vfs {
466466
}
467467
}
468468

469+
/// Get the root pseudo fs's reference in vfs
470+
pub fn get_root_pseudofs(&self) -> &PseudoFs {
471+
&self.root
472+
}
473+
469474
// Inode converting rules:
470475
// 1. Pseudo fs inode is not hashed
471476
// 2. Index is always larger than 0 so that pseudo fs inodes are never affected

0 commit comments

Comments
 (0)