diff options
Diffstat (limited to 'lib/fbsd-device.c')
-rw-r--r-- | lib/fbsd-device.c | 9 |
1 files changed, 5 insertions, 4 deletions
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, |