X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Ffbsd-device.c;h=742c6419f54efa1dbdb1b64057c3402e40345624;hb=165a50cb7aace1ebe36bf2c8fdca206c17b848ee;hp=875480daa332f29882d7326539e36657b8440879;hpb=bb8c98633136217db4851845b47dc5fbf6e3741b;p=pciutils.git diff --git a/lib/fbsd-device.c b/lib/fbsd-device.c index 875480d..742c641 100644 --- a/lib/fbsd-device.c +++ b/lib/fbsd-device.c @@ -33,13 +33,13 @@ static void fbsd_config(struct pci_access *a) { - a->method_params[PCI_ACCESS_FBSD_DEVICE] = PCI_PATH_FBSD_DEVICE; + pci_define_param(a, "fbsd.path", PCI_PATH_FBSD_DEVICE, "Path to the FreeBSD PCI device"); } static int fbsd_detect(struct pci_access *a) { - char *name = a->method_params[PCI_ACCESS_FBSD_DEVICE]; + char *name = pci_get_param(a, "fbsd.path"); if (access(name, R_OK)) { @@ -53,7 +53,7 @@ fbsd_detect(struct pci_access *a) static void fbsd_init(struct pci_access *a) { - char *name = a->method_params[PCI_ACCESS_FBSD_DEVICE]; + char *name = pci_get_param(a, "fbsd.path"); a->fd = open(name, O_RDWR, 0); if (a->fd < 0) @@ -154,7 +154,8 @@ fbsd_write(struct pci_dev *d, int pos, byte *buf, int len) } struct pci_methods pm_fbsd_device = { - "FreeBSD-device", + "fbsd-device", + "FreeBSD /dev/pci device", fbsd_config, fbsd_detect, fbsd_init,