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

Method ReadBlock

Kernel/src/fs/ext2.cpp:365–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363 }
364
365 int Ext2Volume::ReadBlock(uint32_t block, void* buffer){
366 if(block > super.blockCount)
367 return 1;
368
369 if(int e = part->ReadBlock(BlockToLBA(block), blocksize, buffer)){
370 Log::Error("[Ext2] Disk error (%d) reading block %d (blocksize: %d)", e, block, blocksize);
371 return e;
372 }
373
374 return 0;
375 }
376
377 int Ext2Volume::WriteBlock(uint32_t block, void* buffer){
378 if(block > super.blockCount)

Callers 9

IdentifyFunction · 0.45
Fat32VolumeMethod · 0.45
GetClusterChainMethod · 0.45
ReadClusterChainMethod · 0.45
IdentifyFunction · 0.45
Ext2VolumeMethod · 0.45
ReadInodeMethod · 0.45
ReadBlockCachedMethod · 0.45
SyncInodeMethod · 0.45

Calls 1

ErrorFunction · 0.85

Tested by

no test coverage detected