summaryrefslogtreecommitdiff
path: root/lib/obsd-device.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2008-02-12 09:54:36 +0100
committerMartin Mares <mj@ucw.cz>2008-02-12 09:54:36 +0100
commitcb6ee324dd157dc5dec68eab488e7c829e92e2a2 (patch)
tree18e3eb90aab780ec60223695ad7dc338dd716783 /lib/obsd-device.c
parentd6dcc545806168d496ecc52ca52603fdc0dfd395 (diff)
downloadpciutils-cb6ee324dd157dc5dec68eab488e7c829e92e2a2.tar.gz
Replaced the method_params array by library parameters.
This change is backward incompatible, but hopefully nobody used this ill-thought interface.
Diffstat (limited to 'lib/obsd-device.c')
-rw-r--r--lib/obsd-device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/obsd-device.c b/lib/obsd-device.c
index 721f2f5..217e787 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)