diff options
author | Martin Mares <mj@ucw.cz> | 2008-02-20 12:18:19 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2008-02-20 12:18:19 +0100 |
commit | a2bf30a4fd407c55e8172e2f6fd158725ccb90b6 (patch) | |
tree | 971b143dc78a2b88ac43e01e2914ba23b95fcd57 /lib/obsd-device.c | |
parent | daf1afbf693d83566863e6dc5447e0bebdd1c679 (diff) | |
parent | 4d59f9e543c291e1454c638e32cbe94af66b11b8 (diff) | |
download | pciutils-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.c | 9 |
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, |