| 61 | } |
| 62 | |
| 63 | ssize_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 | |
| 77 | ssize_t DiskDevice::Write(size_t off, size_t size, uint8_t* buffer){ |
| 78 | return -ENOSYS; |
nothing calls this directly
no outgoing calls
no test coverage detected