diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-01 10:40:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-01 10:40:19 +0200 |
| commit | 48d0df78c872f7b843f2444a6bcfa41438dc736e (patch) | |
| tree | 34c23cc3508114f3985289f6cb4e915454604426 /dev/kernel/src/Storage/AHCIDeviceInterface.cc | |
| parent | f88f6074479c627529559f690bf836960d5a6378 (diff) | |
| parent | 1c3b37123cef3fa9c69099bc6228d7b4a082ee90 (diff) | |
Merge pull request #5 from amlel-el-mahrouss/dev
pr/ahci: important patches.
Diffstat (limited to 'dev/kernel/src/Storage/AHCIDeviceInterface.cc')
| -rw-r--r-- | dev/kernel/src/Storage/AHCIDeviceInterface.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/dev/kernel/src/Storage/AHCIDeviceInterface.cc b/dev/kernel/src/Storage/AHCIDeviceInterface.cc index 9419dc4e..1798e9a9 100644 --- a/dev/kernel/src/Storage/AHCIDeviceInterface.cc +++ b/dev/kernel/src/Storage/AHCIDeviceInterface.cc @@ -36,16 +36,16 @@ const Char* AHCIDeviceInterface::Name() const } /// @brief Output operator. -/// @param Data the disk mountpoint. +/// @param mnt the disk mountpoint. /// @return the class itself after operation. -AHCIDeviceInterface& AHCIDeviceInterface::operator<<(MountpointInterface* Data) +AHCIDeviceInterface& AHCIDeviceInterface::operator<<(MountpointInterface* mnt) { - if (!Data) + if (!mnt) return *this; for (SizeT driveCount = 0; driveCount < kDriveMaxCount; ++driveCount) { - auto interface = Data->GetAddressOf(driveCount); + auto interface = mnt->GetAddressOf(driveCount); if ((interface) && rt_string_cmp((interface)->fProtocol(), "AHCI", rt_string_len("AHCI")) == 0) { @@ -59,20 +59,20 @@ AHCIDeviceInterface& AHCIDeviceInterface::operator<<(MountpointInterface* Data) } return (AHCIDeviceInterface&)IDeviceObject<MountpointInterface*>::operator<<( - Data); + mnt); } /// @brief Input operator. -/// @param Data the disk mountpoint. +/// @param mnt the disk mountpoint. /// @return the class itself after operation. -AHCIDeviceInterface& AHCIDeviceInterface::operator>>(MountpointInterface* Data) +AHCIDeviceInterface& AHCIDeviceInterface::operator>>(MountpointInterface* mnt) { - if (!Data) + if (!mnt) return *this; for (SizeT driveCount = 0; driveCount < kDriveMaxCount; ++driveCount) { - auto interface = Data->GetAddressOf(driveCount); + auto interface = mnt->GetAddressOf(driveCount); // really check if it's ATA. if ((interface) && rt_string_cmp((interface)->fProtocol(), "AHCI", rt_string_len("AHCI")) == 0) @@ -87,7 +87,7 @@ AHCIDeviceInterface& AHCIDeviceInterface::operator>>(MountpointInterface* Data) } return (AHCIDeviceInterface&)IDeviceObject<MountpointInterface*>::operator>>( - Data); + mnt); } const UInt16& AHCIDeviceInterface::GetPortsImplemented() @@ -109,4 +109,5 @@ const UInt32& AHCIDeviceInterface::GetIndex() Void AHCIDeviceInterface::SetIndex(const UInt32& drv) { MUST_PASS(MountpointInterface::kDriveIndexInvalid != drv); + this->fDriveIndex = drv; }
\ No newline at end of file |
