From 7f7d12445c3c30d93445b38c88633ced7cef73e8 Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Fri, 24 Mar 2023 11:08:20 +0100 Subject: [PATCH] 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 --- src/common_device_name.c | 3 +++ 1 file changed, 3 insertions(+) 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"); -- GitLab