diff options
author | Emmanuel Vadot <manu@FreeBSD.org> | 2023-03-24 11:08:20 +0100 |
---|---|---|
committer | Emmanuel Vadot <manu@FreeBSD.org> | 2023-03-24 11:09:27 +0100 |
commit | 7f7d12445c3c30d93445b38c88633ced7cef73e8 (patch) | |
tree | d9a12ba9031f7f607eb5064f21a11adbed513dad /src | |
parent | 833c86ce15cee2a84a37ae71015f236fd32615d9 (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.c | 3 |
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"); |