diff options
author | David Sommerseth <davids@redhat.com> | 2013-04-05 18:25:23 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2013-04-05 18:25:23 +0200 |
commit | 39869fb9346cd46097bd6d70a90f351938d30296 (patch) | |
tree | a7afc342e03901b9ba9e822efb32b0949ce352e0 | |
parent | d6987c53d3648d85e410ef81a343867e239eb960 (diff) | |
download | python-dmidecode-39869fb9346cd46097bd6d70a90f351938d30296.tar.gz python-dmidecode-39869fb9346cd46097bd6d70a90f351938d30296.tar.xz python-dmidecode-39869fb9346cd46097bd6d70a90f351938d30296.zip |
Do not add explictly 'dmispec' attributes inside switch() in dmi_decode()
The dmispec attribute is added outside the switch() call, and must not be
duplicated. If this happens, an invalid XML file will be generated.
(Un)fortunately, libxml2 is quite forgiving to this error. But xmllint
will complain about it and other XML libraries (such as python-lxml)
may reject such XML data.
Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r-- | src/dmidecode.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/dmidecode.c b/src/dmidecode.c index 17f2130..215c3f4 100644 --- a/src/dmidecode.c +++ b/src/dmidecode.c @@ -4784,7 +4784,6 @@ xmlNode *dmi_decode(xmlNode *prnt_n, dmi_codes_major *dmiMajor, struct dmi_heade case 40: /* 3.3.41 Additional Information */ dmixml_AddAttribute(sect_n, "subtype", "AdditionalInformation"); - dmixml_AddAttribute(sect_n, "dmispec", "3.3.41"); if(h->length < 0x0B) { break; @@ -4795,7 +4794,6 @@ xmlNode *dmi_decode(xmlNode *prnt_n, dmi_codes_major *dmiMajor, struct dmi_heade case 41: /* 3.3.42 Onboard Device Extended Information */ dmixml_AddAttribute(sect_n, "subtype", "OnboardDeviceExtendedInformation"); - dmixml_AddAttribute(sect_n, "dmispec", "3.3.42"); if(h->length < 0x0B) { break; |