MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / Init

Function Init

src/filesystem/vfs/vfs.cpp:80–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80auto Init() -> Expected<void> {
81 if (GetVfsState().initialized) {
82 return {};
83 }
84
85 LockGuard<SpinLock> guard(GetVfsState().vfs_lock_);
86 klog::Info("VFS: initializing...");
87
88 // 初始化挂载表(使用全局单例,与 GetMountTable() 统一)
89 GetVfsState().mount_table = &GetMountTable();
90
91 GetVfsState().initialized = true;
92 klog::Info("VFS: initialization complete");
93 return {};
94}
95
96auto GetRootDentry() -> Dentry* { return GetVfsState().root_dentry; }
97

Callers 4

FileSystemInitFunction · 0.85
fatfs_testFunction · 0.85
SetUpMethod · 0.85
TEST_FFunction · 0.85

Calls 3

GetVfsStateFunction · 0.85
InfoFunction · 0.85
GetMountTableFunction · 0.85

Tested by 3

fatfs_testFunction · 0.68
SetUpMethod · 0.68
TEST_FFunction · 0.68