diff options
author | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-09-04 02:26:09 +0000 |
---|---|---|
committer | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-09-04 02:26:09 +0000 |
commit | b3880a3305dcdd866638202b9da95cd99f06b085 (patch) | |
tree | 142d2cb2bc06d47be73276ea2ca5e14d6ac532f7 /dmidecodemodule.c | |
parent | 1fea35ea0c1635e080028c914b88849c721764e6 (diff) | |
download | python-dmidecode-b3880a3305dcdd866638202b9da95cd99f06b085.tar.gz python-dmidecode-b3880a3305dcdd866638202b9da95cd99f06b085.tar.xz python-dmidecode-b3880a3305dcdd866638202b9da95cd99f06b085.zip |
Work on CPU details - seemed to been a bug with appending to a string rather
than rewriting it.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@67 abc39116-655e-4be6-ad55-d661dc543056
Diffstat (limited to 'dmidecodemodule.c')
-rw-r--r-- | dmidecodemodule.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dmidecodemodule.c b/dmidecodemodule.c index 5b6f63a..6e9cfe5 100644 --- a/dmidecodemodule.c +++ b/dmidecodemodule.c @@ -120,6 +120,10 @@ static PyObject* dmidecode_get_memory(PyObject *self, PyObject *args) { return d static PyObject* dmidecode_get_cache(PyObject *self, PyObject *args) { return dmidecode_get(self, "cache"); } static PyObject* dmidecode_get_connector(PyObject *self, PyObject *args) { return dmidecode_get(self, "connector"); } static PyObject* dmidecode_get_slot(PyObject *self, PyObject *args) { return dmidecode_get(self, "slot"); } +static PyObject* dmidecode_get_type(PyObject *self, PyObject *args) { + fprintf(stderr, "%s\n", PyString_AsString(args)); + return dmidecode_get(self, PyString_AsString(args)); +} PyMethodDef DMIDataMethods[] = { { "bios", dmidecode_get_bios, METH_VARARGS, "BIOS Data" }, @@ -131,6 +135,7 @@ PyMethodDef DMIDataMethods[] = { { "cache", dmidecode_get_cache, METH_VARARGS, "Cache Data" }, { "connector", dmidecode_get_connector, METH_VARARGS, "Connector Data" }, { "slot", dmidecode_get_slot, METH_VARARGS, "Slot Data" }, + { "type", dmidecode_get_type, METH_VARARGS, "By Type" }, { NULL, NULL, 0, NULL } }; |