mirror of
https://github.com/86Box/probing-tools.git
synced 2026-02-22 01:25:35 -07:00
clib: Expose libpci access structure to individual tools
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
uint8_t pci_mechanism = 0, pci_device_count = 0;
|
||||
#ifdef PCI_LIB_VERSION
|
||||
static struct pci_access *pacc;
|
||||
struct pci_access *pacc;
|
||||
static struct pci_dev *pdev = NULL;
|
||||
# if defined(_WIN32) && (PCI_LIB_VERSION >= 0x030800)
|
||||
# define DUMMY_CONFIG_SPACE
|
||||
|
||||
@@ -20,11 +20,12 @@
|
||||
#include "clib.h"
|
||||
|
||||
#if defined(__GNUC__) && !defined(__POSIX_UEFI__)
|
||||
#include <pci/pci.h>
|
||||
# include <pci/pci.h>
|
||||
static inline void libpci_init(struct pci_access *pacc) { pci_init(pacc); }
|
||||
static inline void libpci_scan_bus(struct pci_access *pacc) { pci_scan_bus(pacc); }
|
||||
#define pci_init pci_init_
|
||||
#define pci_scan_bus pci_scan_bus_
|
||||
# define pci_init pci_init_
|
||||
# define pci_scan_bus pci_scan_bus_
|
||||
extern struct pci_access *pacc;
|
||||
#endif
|
||||
|
||||
/* Global variables. */
|
||||
|
||||
Reference in New Issue
Block a user