MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / Read

Method Read

Kernel/src/storage/diskdevice.cpp:63–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63ssize_t DiskDevice::Read(size_t off, size_t size, uint8_t* buffer){
64 if(off % blocksize){
65 return -EINVAL; // Block aligned reads only
66 }
67
68 int e = ReadDiskBlock(off / blocksize, size, buffer);
69
70 if(e){
71 return -EIO;
72 }
73
74 return size;
75}
76
77ssize_t DiskDevice::Write(size_t off, size_t size, uint8_t* buffer){
78 return -ENOSYS;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected