summaryrefslogtreecommitdiffhomepage
path: root/Kernel/Source/Storage/AHCIDeviceInterface.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Source/Storage/AHCIDeviceInterface.cxx')
-rw-r--r--Kernel/Source/Storage/AHCIDeviceInterface.cxx35
1 files changed, 35 insertions, 0 deletions
diff --git a/Kernel/Source/Storage/AHCIDeviceInterface.cxx b/Kernel/Source/Storage/AHCIDeviceInterface.cxx
new file mode 100644
index 00000000..da25c05d
--- /dev/null
+++ b/Kernel/Source/Storage/AHCIDeviceInterface.cxx
@@ -0,0 +1,35 @@
+/* -------------------------------------------
+
+ Copyright SoftwareLabs
+
+------------------------------------------- */
+
+#include <StorageKit/AHCI.hpp>
+
+using namespace NewOS;
+
+/// @brief Class constructor
+/// @param Out Disk output
+/// @param In Disk input
+/// @param Cleanup Disk cleanup.
+AHCIDeviceInterface::AHCIDeviceInterface(void (*Out)(MountpointInterface* outpacket),
+ void (*In)(MountpointInterface* inpacket),
+ void (*Cleanup)(void))
+ : DeviceInterface(Out, In), fCleanup(Cleanup)
+{
+}
+
+/// @brief Class desctructor
+AHCIDeviceInterface::~AHCIDeviceInterface()
+{
+ MUST_PASS(fCleanup);
+ if (fCleanup)
+ fCleanup();
+}
+
+/// @brief Returns the name of the device interface.
+/// @return it's name as a string.
+const char* AHCIDeviceInterface::Name() const
+{
+ return "AHCIDeviceInterface";
+}