| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To use this API, you need to import dmidecodeXML. This is a wrapper class for
the internal XML API which has been implemented. In addition, you might also
want to import libxml2 as well.
dmidecodeXML::QuerySection(<string>)
Valid section strings can be found in the pymap.xml file, in the <GroupMapping>
tag section.
dmidecodeXML::TypeId(<integer between 0-255>)
Valid values should match the DMI/SMBIOS specification.
dmidecodeXML::SetResultType(resultType)
Result type can be either dmidecodeXML.DMIXML_NODE or dmidecodeXML.DMIXML_DOC
----------------------------------------------------------
import libxml2
import dmidecodeXML
dmixml = dmidecodeXML.dmidecodeXML()
section_nodes = dmixml.QuerySection('processor')
dmixml.SetResultType(dmidecodeXML.DMIXML_DOC)
typeid_doc = dmixml.QueryTypeId(0x10)
dmixml.SetResultType(dmidecodeXML.DMIXML_NODE)
typeid_doc.saveFormatFileEnc("-", "UTF-8", 1)
----------------------------------------------------------
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This function will then convert the value to proper hex value for further
processing.
|
|
|
|
|
|
| |
Instead of building up an u8 array with 255 cells where we only use one
cell at the time now, just pass the type id value as an int the whole way
through.
|
|
|
|
| |
exported the function
|
|
|
|
|
| |
This resolves Ticket #7 (http://projects.autonomy.net.au/python-dmidecode/ticket/7)
(cherry picked from commit 39cbdfb56e80cabbd67754d8d77f781e14eaa3da)
|
| |
|
|
|
|
| |
Also cleaned up a little bit more, removed more unneeded stuff.
|
|
|
|
|
|
|
| |
Removed the `dmi_table_string' function, and `const struct
string_keyword *string' from the `options' struct. Also modified
the function calls that are now free of this, namely, `legacy_decode'
and `smbios_decode'.
|
| |
|
| |
|
|
|
|
|
| |
This got removed in commit 63e6c57e448d9dcc795cb14e89de6eb51f1033f6, but is
needed for the following struct in dmihelper.h, and in dmidecode.c::dmi_decode():3694
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
names
Also changed dmiMAP_ParseMappingXML(...) to dmiMAP_ParseMappingXML_GroupName(...). In the
dmidecode_get(...) function. This is just a quick fix for making it compile. It's also
needed to implement usage of dmiMAP_ParseMappingXML_TypeID(...) as well.
|
| |
|
| |
|
|
|
|
|
| |
This function did not work as expected and due to the rewrite of xmlpythonizer,
this function is not longer needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed the automagic in the dmiMAP_ParseMappingXML(...) function from
automatically decide what to parse (TypeMapping or GroupMapping). Introduced
two new functions instead:
- dmiMAP_ParseMappingXML_GroupName(xmlDoc *xmlmap, const char *name)
Parses the XML mapping document, using the GroupMapping tags and building
up a proper ptzMAP structure for all TypeMap defined in that group.
- dmiMAP_ParseMappingXML_TypeID(xmlDoc *xmlmap, const char *typeid)
Parses the XML mapping document, using only the TypeMapping section in th
mapping document.
Rewrote a lot of internal parts to reuse as much of the existing code as possible.
|
|
|
|
| |
The previous version did not consider the tag name when searching for nodes.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Note that this will not work as expected for `group mappings' that
have unimplemented `type maps', and this is because the linked-list
chain will ne broken at the first unimplemented `type map'
There is no reason to code a workaround for this as the type do have
to be implemented eventually, and hence added code will merely be
noise.
|
|
|
|
|
|
|
|
| |
Merged the two XML files into one, and amended relevant code. I still
want to modify the XML tag names, but not yet.
The calls to dmidecode.type() not function as expected, but the others
are broken - this is next.
|
| |
|
|
|
|
| |
In doing so, found and fixed a few mistakes in my previous commit.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than hardcoding the data by function name (e.g. system, bios,
connector, slot, etc), create each `type' as an individual XML tree,
then group them under user-friendly names (as per the function names).
Here the `pythonmap.xml' groups (but does not define) the various
types (0..255), the types themselves are however defined in
`typemap.xml'.
This commit is broken, and a WIP.
|
|
|
|
|
|
|
| |
Updated test unit to match.
Throw an exception instead of returning None/False in some
functions.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Removed trailing spaces from xml data file.
Commented out fprintf()s for now (Perhapse should add them to the
debug build at least).
|
|
|
|
|
|
|
|
|
| |
Don't write to stdout unless in debug mode (with respect to writing
to memory devices.
Added the xml datafile to setup (distutils).
Updated test case (incorporating color and cleaning up tests).
|
| |
|
| |
|