From 0f24ef6fb9a98a4554fb533281f25902e60deaf4 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 12 Feb 2008 09:37:03 +0100 Subject: [PATCH] Parameters now have help texts. --- lib/init.c | 7 ++++--- lib/internal.h | 2 +- lib/pci.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/init.c b/lib/init.c index 167c893..45c7590 100644 --- a/lib/init.c +++ b/lib/init.c @@ -68,8 +68,8 @@ pci_alloc(void) memset(a, 0, sizeof(*a)); pci_set_name_list_path(a, PCI_PATH_IDS_DIR "/" PCI_IDS, 0); #ifdef PCI_USE_DNS - pci_define_param(a, "net.domain", PCI_ID_DOMAIN); - pci_define_param(a, "net.cache_path", "~/.pciids-cache"); + pci_define_param(a, "net.domain", PCI_ID_DOMAIN, "DNS domain used for resolving of ID's"); + pci_define_param(a, "net.cache_path", "~/.pciids-cache", "Name of the ID cache file"); a->id_lookup_mode = PCI_LOOKUP_CACHE; #endif for(i=0; iparam = param; p->value = value; p->value_malloced = 0; + p->help = help; } int diff --git a/lib/internal.h b/lib/internal.h index 3299104..1f6a2f6 100644 --- a/lib/internal.h +++ b/lib/internal.h @@ -36,7 +36,7 @@ char *pci_strdup(struct pci_access *a, char *s); struct pci_dev *pci_alloc_dev(struct pci_access *); int pci_link_dev(struct pci_access *, struct pci_dev *); -void pci_define_param(struct pci_access *acc, char *param, char *val); +void 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); extern struct pci_methods pm_intel_conf1, pm_intel_conf2, pm_linux_proc, diff --git a/lib/pci.h b/lib/pci.h index 030363a..4d18385 100644 --- a/lib/pci.h +++ b/lib/pci.h @@ -91,6 +91,7 @@ struct pci_param { char *param; /* Name of the parameter */ char *value; /* Value of the parameter */ int value_malloced; /* used internally */ + char *help; /* Explanation of the parameter */ }; char *pci_get_param(struct pci_access *acc, char *param); -- 2.39.2