]> mj.ucw.cz Git - pciutils.git/commit
libpci: For PCI_OS_WINDOWS allows to load pci.ids from executable directory
authorPali Rohár <pali@kernel.org>
Sun, 26 Dec 2021 18:06:53 +0000 (19:06 +0100)
committerMartin Mareš <mj@ucw.cz>
Sun, 26 Dec 2021 21:39:38 +0000 (22:39 +0100)
commit2608d8f72d587f5913998e2483c841dc211f9307
tree5282195e76fa7635591294ad70d37d699d96413a
parentb8fbb6f00e1f6b495dc826009f1494835e56a2c7
libpci: For PCI_OS_WINDOWS allows to load pci.ids from executable directory

For Windows applications it is common to have all support data files in the
same directory where is stored executable itself, instead of in directory
hardcoded at compile time.

When PCI_PATH_IDS_DIR is set to "." it means that pci.ids file is located
in the current working directory. This is also unsuitable for Windows
command line applications stored in %PATH% because cmd.exe starts in some
default user or system location.

Adds a new option to allow specifying PCI_PATH_IDS_DIR to empty string ""
and for PCI_OS_WINDOWS platform it would mean to locate pci.ids file in the
same directory where is stored currently running executable. On Windows it
is always possible to detected this directory.
lib/configure
lib/init.c