Skip to content

Commit

Permalink
Add a new header pci.ids.h with the content of scripts/pcs.ids to avo…
Browse files Browse the repository at this point in the history
…id reading the file in runtime #60 (#81)

* Add a new header pci.ids.h with the content of scripts/pcs.ids to avoid reading the file in runtime

* Fix clang format errors

* Fix get_pci_ids function name
  • Loading branch information
facug91 authored Mar 15, 2024
1 parent ae411a7 commit 5f01b5a
Show file tree
Hide file tree
Showing 4 changed files with 36,428 additions and 13 deletions.
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ target_include_directories(HWinfo PUBLIC ${PROJECT_SOURCE_DIR}/include/)

install(DIRECTORY include/hwinfo DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
file(COPY "scripts/pci.ids" DESTINATION "$ENV{HOME}/.hwinfo/")
endif ()

if (NOT PROJECT_IS_TOP_LEVEL)
return()
endif()
Expand Down
2 changes: 1 addition & 1 deletion include/hwinfo/utils/PCIMapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct PCIVendor {

class PCIMapper {
public:
explicit PCIMapper(const std::string& pci_ids_file);
explicit PCIMapper();
~PCIMapper() = default;

const PCIVendor& vendor_from_id(const std::string& vendor_id) const;
Expand Down
Loading

0 comments on commit 5f01b5a

Please sign in to comment.