X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fnbsd-libpci.c;h=2d24c4cee69d96c92b421c126999adf1bede471b;hb=25cc4350661290538bdc0eb9932600309fd603f3;hp=81600a0689051b9bcb501be2d3a6a04898653c22;hpb=9c79fcc45a0b13b5beb66834f6359e21adcfdd53;p=pciutils.git diff --git a/lib/nbsd-libpci.c b/lib/nbsd-libpci.c index 81600a0..2d24c4c 100644 --- a/lib/nbsd-libpci.c +++ b/lib/nbsd-libpci.c @@ -25,13 +25,13 @@ static void nbsd_config(struct pci_access *a) { - a->method_params[PCI_ACCESS_NBSD_LIBPCI] = PCI_PATH_NBSD_DEVICE; + pci_define_param(a, "nbsd.path", PCI_PATH_NBSD_DEVICE, "Path to the NetBSD PCI device"); } static int nbsd_detect(struct pci_access *a) { - char *name = a->method_params[PCI_ACCESS_NBSD_LIBPCI]; + char *name = pci_get_param(a, "nbsd.path"); if (access(name, R_OK)) { @@ -48,7 +48,7 @@ nbsd_detect(struct pci_access *a) static void nbsd_init(struct pci_access *a) { - char *name = a->method_params[PCI_ACCESS_NBSD_LIBPCI]; + char *name = pci_get_param(a, "nbsd.path"); int mode = a->writeable ? O_RDWR : O_RDONLY; a->fd = open(name, mode, 0); @@ -141,7 +141,8 @@ nbsd_write(struct pci_dev *d, int pos, byte *buf, int len) } struct pci_methods pm_nbsd_libpci = { - "NetBSD-libpci", + "nbsd-libpci", + "NetBSD libpci", nbsd_config, nbsd_detect, nbsd_init,