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))
{
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)
}
struct pci_methods pm_fbsd_device = {
- "FreeBSD-device",
+ "fbsd-device",
+ "FreeBSD /dev/pci device",
fbsd_config,
fbsd_detect,
fbsd_init,