summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2023-03-24 11:08:20 +0100
committerEmmanuel Vadot <manu@FreeBSD.org>2023-03-24 11:09:27 +0100
commit7f7d12445c3c30d93445b38c88633ced7cef73e8 (patch)
treed9a12ba9031f7f607eb5064f21a11adbed513dad /src
parent833c86ce15cee2a84a37ae71015f236fd32615d9 (diff)
FreeBSD: Fallback to /usr/share/misc/pci_vendors
FreeBSD already have a copy of the pci.ids file present in base. Continue to prefer the upstream pci.ids (which can be installed via the FreeBSD ports misc/pciids) but fallback on the one from base if it doesn't exists. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Diffstat (limited to 'src')
-rw-r--r--src/common_device_name.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common_device_name.c b/src/common_device_name.c
index 3dd35d7..4ca8cd1 100644
--- a/src/common_device_name.c
+++ b/src/common_device_name.c
@@ -86,6 +86,9 @@ pci_id_file_open(void)
result = fopen(PCIIDS_PATH "/pci.ids", "re");
if (result)
return result;
+#ifdef __FreeBSD__
+ return fopen("/usr/share/misc/pci_vendors", "re");
+#endif
#endif
return fopen(PCIIDS_PATH "/pci.ids", "r");