aboutsummaryrefslogtreecommitdiffstats
path: root/lib/params.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/params.c')
-rw-r--r--lib/params.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/params.c b/lib/params.c
index ac756ad..9b4c2e2 100644
--- a/lib/params.c
+++ b/lib/params.c
@@ -25,7 +25,7 @@ pci_get_param(struct pci_access *acc, char *param)
return NULL;
}
-void
+struct pci_param *
pci_define_param(struct pci_access *acc, char *param, char *value, char *help)
{
struct pci_param *p, **pp;
@@ -37,7 +37,7 @@ pci_define_param(struct pci_access *acc, char *param, char *value, char *help)
{
if (strcmp(p->value, value) || strcmp(p->help, help))
acc->error("Parameter %s re-defined differently", param);
- return;
+ return p;
}
if (cmp > 0)
break;
@@ -50,6 +50,7 @@ pci_define_param(struct pci_access *acc, char *param, char *value, char *help)
p->value = value;
p->value_malloced = 0;
p->help = help;
+ return p;
}
int