summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/src/Storage/AHCIDeviceInterface.cc
diff options
context:
space:
mode:
authorAmlal <amlal.elmahrouss@icloud.com>2025-02-22 08:45:43 +0100
committerAmlal <amlal.elmahrouss@icloud.com>2025-02-22 08:45:43 +0100
commit34f62ae2dd8c77cee1f0f3680caf407b1be6b350 (patch)
tree0985426a5d3baf2ae398a3f27ee4faca5d879f2e /dev/Kernel/src/Storage/AHCIDeviceInterface.cc
parent917938db87fee3a905a78c499d2fe1dc2f0b5ca5 (diff)
New DeviceMgr, other APIs have been reworked as a result.
AHCI becomes the first module to be available in StorageKit. Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/src/Storage/AHCIDeviceInterface.cc')
-rw-r--r--dev/Kernel/src/Storage/AHCIDeviceInterface.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/dev/Kernel/src/Storage/AHCIDeviceInterface.cc b/dev/Kernel/src/Storage/AHCIDeviceInterface.cc
index a6f36731..ff348f57 100644
--- a/dev/Kernel/src/Storage/AHCIDeviceInterface.cc
+++ b/dev/Kernel/src/Storage/AHCIDeviceInterface.cc
@@ -12,10 +12,10 @@ using namespace NeOS;
/// @param Out Drive output
/// @param In Drive input
/// @param Cleanup Drive cleanup.
-AHCIDeviceInterface::AHCIDeviceInterface(void (*Out)(MountpointInterface* outpacket),
- void (*In)(MountpointInterface* inpacket),
- void (*Cleanup)(void))
- : IDeviceObject(Out, In), fCleanup(Cleanup)
+AHCIDeviceInterface::AHCIDeviceInterface(void (*out)(IDeviceObject* self, MountpointInterface* outpacket),
+ void (*in)(IDeviceObject* self, MountpointInterface* inpacket),
+ void (*cleanup)(void))
+ : IDeviceObject(out, in), fCleanup(cleanup)
{
}
@@ -23,6 +23,7 @@ AHCIDeviceInterface::AHCIDeviceInterface(void (*Out)(MountpointInterface* outpac
AHCIDeviceInterface::~AHCIDeviceInterface()
{
MUST_PASS(fCleanup);
+
if (fCleanup)
fCleanup();
}
@@ -31,5 +32,5 @@ AHCIDeviceInterface::~AHCIDeviceInterface()
/// @return it's name as a string.
const Char* AHCIDeviceInterface::Name() const
{
- return "AHCIDeviceInterface";
+ return "/dev/sda{}";
}