From b3880a3305dcdd866638202b9da95cd99f06b085 Mon Sep 17 00:00:00 2001 From: nima Date: Thu, 4 Sep 2008 02:26:09 +0000 Subject: 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 --- dmidecodemodule.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dmidecodemodule.c') 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 } }; -- cgit