diff options
Diffstat (limited to 'dev/kernel/src/Storage/AHCIDeviceInterface.cc')
| -rw-r--r-- | dev/kernel/src/Storage/AHCIDeviceInterface.cc | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/dev/kernel/src/Storage/AHCIDeviceInterface.cc b/dev/kernel/src/Storage/AHCIDeviceInterface.cc new file mode 100644 index 00000000..8d987ab5 --- /dev/null +++ b/dev/kernel/src/Storage/AHCIDeviceInterface.cc @@ -0,0 +1,36 @@ +/* ------------------------------------------- + + Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved. + +------------------------------------------- */ + +#include <StorageKit/AHCI.h> + +using namespace NeOS; + +/// @brief Class constructor +/// @param Out Drive output +/// @param In Drive input +/// @param Cleanup Drive cleanup. +AHCIDeviceInterface::AHCIDeviceInterface(void (*out)(IDeviceObject* self, MountpointInterface* outpacket), + void (*in)(IDeviceObject* self, MountpointInterface* inpacket), + void (*cleanup)(void)) + : IDeviceObject(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 "/dev/sda{}"; +} |
