mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +00:00
Add a simple IDEDiskDevice class that implements DiskDevice from VFS.
This commit is contained in:
parent
8293a0ff36
commit
12e515735b
6 changed files with 88 additions and 11 deletions
41
Kernel/IDEDiskDevice.cpp
Normal file
41
Kernel/IDEDiskDevice.cpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
#include "IDEDiskDevice.h"
|
||||
#include "Disk.h"
|
||||
|
||||
RetainPtr<IDEDiskDevice> IDEDiskDevice::create()
|
||||
{
|
||||
return adopt(*new IDEDiskDevice);
|
||||
}
|
||||
|
||||
IDEDiskDevice::IDEDiskDevice()
|
||||
{
|
||||
}
|
||||
|
||||
IDEDiskDevice::~IDEDiskDevice()
|
||||
{
|
||||
}
|
||||
|
||||
const char* IDEDiskDevice::className() const
|
||||
{
|
||||
return "IDEDiskDevice";
|
||||
}
|
||||
|
||||
unsigned IDEDiskDevice::blockSize() const
|
||||
{
|
||||
return 512;
|
||||
}
|
||||
|
||||
bool IDEDiskDevice::readBlock(unsigned index, byte* out) const
|
||||
{
|
||||
Disk::readSectors(index, 1, out);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IDEDiskDevice::writeBlock(unsigned index, const byte* data)
|
||||
{
|
||||
(void) index;
|
||||
(void) data;
|
||||
kprintf("[IDEDiskDevice] writeBlock not implemented()\n");
|
||||
notImplemented();
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue