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

Function Read

src/filesystem/vfs/read.cpp:13–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace vfs {
12
13auto Read(File* file, void* buf, size_t count) -> Expected<size_t> {
14 if (file == nullptr || buf == nullptr) {
15 return std::unexpected(Error(ErrorCode::kInvalidArgument));
16 }
17
18 LockGuard<SpinLock> guard(GetVfsState().vfs_lock_);
19 if (file->ops == nullptr) {
20 return std::unexpected(Error(ErrorCode::kDeviceNotSupported));
21 }
22
23 return file->ops->Read(file, buf, count);
24}
25
26} // namespace vfs

Callers 15

PageFaultHandlerFunction · 0.85
TimerHandlerFunction · 0.85
TimerInitSMPFunction · 0.85
TimerInitFunction · 0.85
backtraceFunction · 0.85
BasicInfoMethod · 0.85
backtraceFunction · 0.85
GicdMethod · 0.85
EnableMethod · 0.85
DisableMethod · 0.85
ClearMethod · 0.85
IsEnableMethod · 0.85

Calls 3

ErrorClass · 0.85
GetVfsStateFunction · 0.85
ReadMethod · 0.45

Tested by 2

ramfs_testFunction · 0.68
fatfs_testFunction · 0.68