diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-22 06:48:11 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-22 06:48:11 +0100 |
| commit | 6ae47a1fe04296eba06fcde0af4e89e100c6eb76 (patch) | |
| tree | e36568191f20c410b64b0dba9712de85c735ee9b /dev | |
| parent | 9fdaa2f0f2fc3b19fced1c9f3cb9a2780540eab7 (diff) | |
kernel(PCI): Let compare UInt8 (UChar) with PciDeviceKind in Database.h
Applied the patch to Iterator.cc.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/PCI/Iterator.cc | 2 | ||||
| -rw-r--r-- | dev/Kernel/KernelKit/PCI/Database.h | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/dev/Kernel/HALKit/AMD64/PCI/Iterator.cc b/dev/Kernel/HALKit/AMD64/PCI/Iterator.cc index 9758e021..bf215fe2 100644 --- a/dev/Kernel/HALKit/AMD64/PCI/Iterator.cc +++ b/dev/Kernel/HALKit/AMD64/PCI/Iterator.cc @@ -19,7 +19,7 @@ namespace NeOS::PCI { Device dev(bus, device, function, 0x00); - if (dev.Class() == (UChar)type) + if (dev.Class() == type) { fDevices[bus] = dev; } diff --git a/dev/Kernel/KernelKit/PCI/Database.h b/dev/Kernel/KernelKit/PCI/Database.h index 82f38d33..cb12a731 100644 --- a/dev/Kernel/KernelKit/PCI/Database.h +++ b/dev/Kernel/KernelKit/PCI/Database.h @@ -36,3 +36,23 @@ namespace NeOS }; } // namespace Types } // namespace NeOS + +inline BOOL operator!=(const NeOS::Types::PciDeviceKind& lhs, NeOS::UChar rhs) +{ + return rhs != (NeOS::UChar)lhs; +} + +inline BOOL operator==(const NeOS::Types::PciDeviceKind& lhs, NeOS::UChar rhs) +{ + return rhs == (NeOS::UChar)lhs; +} + +inline BOOL operator!=(NeOS::UChar lhs, const NeOS::Types::PciDeviceKind& rhs) +{ + return lhs != (NeOS::UChar)rhs; +} + +inline BOOL operator==(NeOS::UChar lhs, const NeOS::Types::PciDeviceKind& rhs) +{ + return lhs == (NeOS::UChar)rhs; +}
\ No newline at end of file |
