Esempio n. 1
0
struct pci_access *
pci_alloc(void)
{
  struct pci_access *a = malloc(sizeof(struct pci_access));
  int i;

  memset(a, 0, sizeof(*a));
  pci_set_name_list_path(a, PCI_PATH_IDS_DIR "/" PCI_IDS, 0);
#ifdef PCI_USE_DNS
  pci_define_param(a, "net.domain", PCI_ID_DOMAIN, "DNS domain used for resolving of ID's");
  pci_define_param(a, "net.cache_name", "~/.pciids-cache", "Name of the ID cache file");
  a->id_lookup_mode = PCI_LOOKUP_CACHE;
#endif
  for (i=0; i<PCI_ACCESS_MAX; i++)
    if (pci_methods[i] && pci_methods[i]->config)
      pci_methods[i]->config(a);
  return a;
}
Esempio n. 2
0
static void
proc_config(struct pci_access *a)
{
  pci_define_param(a, "proc.path", PCI_PATH_PROC_BUS_PCI, "Path to the procfs bus tree");
}
Esempio n. 3
0
static void
sysfs_config(struct pci_access *a)
{
  pci_define_param(a, "sysfs.path", PCI_PATH_SYS_BUS_PCI, "Path to the sysfs device tree");
}
Esempio n. 4
0
static void
nbsd_config(struct pci_access *a)
{
    pci_define_param(a, "nbsd.path", PCI_PATH_NBSD_DEVICE, "Path to the NetBSD PCI device");
}
Esempio n. 5
0
static void
dump_config(struct pci_access *a)
{
  pci_define_param(a, "dump.name", "", "Name of the bus dump file to read from");
}
Esempio n. 6
0
static void
obsd_config(struct pci_access *a)
{
  pci_define_param(a, "obsd.path", PCI_PATH_OBSD_DEVICE, "Path to the OpenBSD PCI device");
}
Esempio n. 7
0
static void
fbsd_config(struct pci_access *a)
{
  pci_define_param(a, "fbsd.path", PCI_PATH_FBSD_DEVICE, "Path to the FreeBSD PCI device");
}