Skip to content
This repository was archived by the owner on Apr 24, 2022. It is now read-only.

Commit e25f9d1

Browse files
authoredJan 9, 2020
HWMON was not working for Amd gpu with bus id > 9
1 parent 2e262c6 commit e25f9d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎libhwmon/wrapamdsysfs.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ wrap_amdsysfs_handle* wrap_amdsysfs_create()
119119

120120
try
121121
{
122-
PciDomain = std::stoi(pciIdParts.at(0), nullptr, 10);
123-
PciBus = std::stoi(pciIdParts.at(1), nullptr, 10);
124-
PciDevice = std::stoi(pciIdParts.at(2), nullptr, 10);
125-
PciFunction = std::stoi(pciIdParts.at(3), nullptr, 10);
122+
PciDomain = std::stoi(pciIdParts.at(0), nullptr, 16);
123+
PciBus = std::stoi(pciIdParts.at(1), nullptr, 16);
124+
PciDevice = std::stoi(pciIdParts.at(2), nullptr, 16);
125+
PciFunction = std::stoi(pciIdParts.at(3), nullptr, 16);
126126
}
127127
catch (const std::exception&)
128128
{

0 commit comments

Comments
 (0)
This repository has been archived.