Skip to content

Commit

Permalink
update regex in the get_pci_device_address method to also match addre…
Browse files Browse the repository at this point in the history
…sses with characters
  • Loading branch information
stele95 authored and gort818 committed Oct 3, 2024
1 parent 9c9ad09 commit 77b3f36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ std::string GPUS::get_pci_device_address(const std::string& drm_card_path) {

// Extract the last PCI address from the path using a regular expression
// This regex matches typical PCI addresses like 0000:03:00.0
std::regex pci_address_regex(R"((\d{4}:\d{2}:\d{2}\.\d))");
std::regex pci_address_regex(R"((\d{4}:[a-z0-9]{2}:\d{2}\.\d))");
std::smatch match;
std::string pci_address;

Expand Down

0 comments on commit 77b3f36

Please sign in to comment.