summaryrefslogtreecommitdiff
path: root/Kernel/IDEDiskDevice.cpp
blob: 0ad82540caf27e2d4fc1ac3a360151f267f68554 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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;
}