This will allow overriding pci_param->malloced.
char *pci_set_property(struct pci_dev *d, u32 key, char *value);
/* params.c */
-void pci_define_param(struct pci_access *acc, char *param, char *val, char *help);
+struct pci_param *pci_define_param(struct pci_access *acc, char *param, char *val, char *help);
int pci_set_param_internal(struct pci_access *acc, char *param, char *val, int copy);
void pci_free_params(struct pci_access *acc);
return NULL;
}
-void
+struct pci_param *
pci_define_param(struct pci_access *acc, char *param, char *value, char *help)
{
struct pci_param *p, **pp;
{
if (strcmp(p->value, value) || strcmp(p->help, help))
acc->error("Parameter %s re-defined differently", param);
- return;
+ return p;
}
if (cmp > 0)
break;
p->value = value;
p->value_malloced = 0;
p->help = help;
+ return p;
}
int