summaryrefslogtreecommitdiff
path: root/lib/obsd-device.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2008-02-20 12:18:19 +0100
committerMartin Mares <mj@ucw.cz>2008-02-20 12:18:19 +0100
commita2bf30a4fd407c55e8172e2f6fd158725ccb90b6 (patch)
tree971b143dc78a2b88ac43e01e2914ba23b95fcd57 /lib/obsd-device.c
parentdaf1afbf693d83566863e6dc5447e0bebdd1c679 (diff)
parent4d59f9e543c291e1454c638e32cbe94af66b11b8 (diff)
downloadpciutils-network.tar.gz
Merge with git+ssh://git.ucw.cz/home/mj/GIT/pciutils.git#networknetwork
Diffstat (limited to 'lib/obsd-device.c')
-rw-r--r--lib/obsd-device.c9
1 files changed, 5 insertions, 4 deletions
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,