diff options
author | David Sommerseth <davids@redhat.com> | 2009-05-13 11:44:15 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2009-05-13 11:44:15 +0200 |
commit | 03bdcc92ff93e58a9befa5c9439b0cd656e57ccc (patch) | |
tree | 5e79ead61ea25b814dbfb9c7a69982f50a0f72ee /src/dmidecode.c | |
parent | ff78802fb52fe6404d12cbde3037371b69d05c03 (diff) | |
download | python-dmidecode-03bdcc92ff93e58a9befa5c9439b0cd656e57ccc.tar.gz python-dmidecode-03bdcc92ff93e58a9befa5c9439b0cd656e57ccc.tar.xz python-dmidecode-03bdcc92ff93e58a9befa5c9439b0cd656e57ccc.zip |
Add all CPU flags, and mark them as available or not
This is to preserve backwards compatibility
Diffstat (limited to 'src/dmidecode.c')
-rw-r--r-- | src/dmidecode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dmidecode.c b/src/dmidecode.c index bf7af1b..4a14992 100644 --- a/src/dmidecode.c +++ b/src/dmidecode.c @@ -1121,9 +1121,10 @@ xmlNode *dmi_processor_id(xmlNode *node, u8 type, const u8 * p, const char *vers int i; for(i = 0; i <= 31; i++) { - // Only add those flags which are present - if( (flags[i].flag != NULL) && (edx & (1 << i)) ) { + if( flags[i].flag != NULL ) { xmlNode *flg_n = dmixml_AddTextChild(flags_n, "flag", "%s", flags[i].descr); + dmixml_AddAttribute(flg_n, "available", "%i", + (edx & (1 << i) ? 1 : 0)); dmixml_AddAttribute(flg_n, "flag", "%s", flags[i].flag); } } @@ -3870,6 +3871,7 @@ xmlNode *dmi_decode(xmlNode *prnt_n, struct dmi_header * h, u16 ver) dmi_processor_status(sect_n, data[0x18] & 0x07); } else { dmixml_AddAttribute(sect_n, "populated", "0"); + dmi_processor_status(sect_n, data[0x18] & 0x07); } dmi_processor_upgrade(sect_n, data[0x19]); |