X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fobsd-device.c;h=62395b376f2b5917d84f1797cede1faebfc5eece;hb=2f4211843f4f68c2a8a92155c24ac72d5799379b;hp=721f2f53c31d81193ff6b735fd41283253854043;hpb=9c79fcc45a0b13b5beb66834f6359e21adcfdd53;p=pciutils.git diff --git a/lib/obsd-device.c b/lib/obsd-device.c index 721f2f5..62395b3 100644 --- a/lib/obsd-device.c +++ b/lib/obsd-device.c @@ -19,13 +19,13 @@ static void obsd_config(struct pci_access *a) { - a->method_params[PCI_ACCESS_OBSD_DEVICE] = PCI_PATH_OBSD_DEVICE; + pci_define_param(a, "obsd.path", PCI_PATH_OBSD_DEVICE, "Path to the OpenBSD PCI device"); } static int obsd_detect(struct pci_access *a) { - char *name = a->method_params[PCI_ACCESS_OBSD_DEVICE]; + char *name = pci_get_param(a, "obsd.path"); if (access(name, R_OK)) { @@ -39,7 +39,7 @@ obsd_detect(struct pci_access *a) static void obsd_init(struct pci_access *a) { - char *name = a->method_params[PCI_ACCESS_OBSD_DEVICE]; + char *name = pci_get_param(a, "obsd.path"); a->fd = open(name, O_RDWR, 0); if (a->fd < 0) @@ -136,7 +136,8 @@ obsd_write(struct pci_dev *d, int pos, byte *buf, int len) } struct pci_methods pm_obsd_device = { - "OpenBSD-device", + "obsd-device", + "/dev/pci on OpenBSD", obsd_config, obsd_detect, obsd_init,