device_probe.py: Match NVMe off class code

This commit is contained in:
Mykola Grymalyuk
2023-07-17 15:32:39 -06:00
parent b01adb9c10
commit c19cbd9f41

View File

@@ -791,7 +791,9 @@ class Computer:
nvme_controllers = ioreg.ioiterator_to_list( nvme_controllers = ioreg.ioiterator_to_list(
ioreg.IOServiceGetMatchingServices( ioreg.IOServiceGetMatchingServices(
ioreg.kIOMasterPortDefault, {"IOProviderClass": "IONVMeController", "IOParentMatch": {"IOProviderClass": "IOPCIDevice"}, "IOPropertyMatch": {"IOClass": "IONVMeController"}}, None ioreg.kIOMasterPortDefault,
{"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(NVMeController.CLASS_CODE)[2:].zfill(8)))}]},
None,
)[1] )[1]
) )
for device in sata_controllers: for device in sata_controllers: