summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pcilib/pcilib.h1
-rw-r--r--pcilib/xml.c2
-rw-r--r--xml/types.xsd2
3 files changed, 5 insertions, 0 deletions
diff --git a/pcilib/pcilib.h b/pcilib/pcilib.h
index dbf837d..30bcdab 100644
--- a/pcilib/pcilib.h
+++ b/pcilib/pcilib.h
@@ -142,6 +142,7 @@ typedef struct {
pcilib_register_value_t value; /**< This value will get assigned instead of the name */
pcilib_register_value_t min, max; /**< the values in the specified range are aliased by name */
const char *name; /**< corresponding string to value */
+ const char *description; /**< longer description */
} pcilib_register_value_name_t;
typedef struct {
diff --git a/pcilib/xml.c b/pcilib/xml.c
index b9deed2..b022fd8 100644
--- a/pcilib/xml.c
+++ b/pcilib/xml.c
@@ -578,6 +578,8 @@ static int pcilib_xml_parse_value_name(pcilib_t *ctx, xmlXPathContextPtr xpath,
if (!strcasecmp(name, "name")) {
desc->name = value;
+ } else if (!strcasecmp(name, "description")) {
+ desc->description = value;
} else if (!strcasecmp(name, "value")) {
val = strtol(value, &endptr, 0);
if ((strlen(endptr) > 0)) {
diff --git a/xml/types.xsd b/xml/types.xsd
index 2346b9d..edcfb08 100644
--- a/xml/types.xsd
+++ b/xml/types.xsd
@@ -68,6 +68,7 @@
<xsd:attribute name="path" type="xsd:string" />
<xsd:attribute name="read_from_register" type="xsd:string" />
<xsd:attribute name="write_to_register" type="xsd:string" />
+ <!-- xsd 1.1 <xsd:assert test="(@path and not(@name)) or (not(@path) and @name)"/> -->
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
@@ -87,6 +88,7 @@
<xsd:attribute name="min" type="pcilib_register_value_t" />
<xsd:attribute name="max" type="pcilib_register_value_t" />
<xsd:attribute name="name" type="xsd:string" use="required" />
+ <xsd:attribute name="description" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="pcilib_unit_t">