summaryrefslogtreecommitdiff
path: root/Kernel/IDEDiskDevice.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-16 14:17:43 +0200
committerAndreas Kling <awesomekling@gmail.com>2018-10-16 14:17:43 +0200
commit12e515735b94972c87426d8e6039e3dfd87cf33d (patch)
treeb9791d0fd2754b498ec94d279276bf429bc7cc03 /Kernel/IDEDiskDevice.h
parent8293a0ff36859aafb2b95835a6c2651659fa3ab9 (diff)
downloadserenity-12e515735b94972c87426d8e6039e3dfd87cf33d.zip
Add a simple IDEDiskDevice class that implements DiskDevice from VFS.
Diffstat (limited to 'Kernel/IDEDiskDevice.h')
-rw-r--r--Kernel/IDEDiskDevice.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/Kernel/IDEDiskDevice.h b/Kernel/IDEDiskDevice.h
new file mode 100644
index 0000000000..efa9db087b
--- /dev/null
+++ b/Kernel/IDEDiskDevice.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#include <AK/RetainPtr.h>
+#include <VirtualFileSystem/DiskDevice.h>
+
+class IDEDiskDevice final : public DiskDevice {
+public:
+ static RetainPtr<IDEDiskDevice> create();
+ virtual ~IDEDiskDevice();
+
+ virtual unsigned blockSize() const override;
+ virtual bool readBlock(unsigned index, byte*) const override;
+ virtual bool writeBlock(unsigned index, const byte*) override;
+
+protected:
+ IDEDiskDevice();
+
+private:
+ virtual const char* className() const override;
+};
+