diff options
author | David Sommerseth <davids@redhat.com> | 2010-01-08 19:56:21 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2010-01-08 19:56:21 +0100 |
commit | 24af40698f1486c899333ea1f129e87590cdee7e (patch) | |
tree | 475ca17b460360bde07bf48fb586153e00a16236 /src/dmixml.c | |
parent | ba6c5a8be14d309955640bac1c14580e6ca61bee (diff) | |
download | python-dmidecode-24af40698f1486c899333ea1f129e87590cdee7e.tar.gz python-dmidecode-24af40698f1486c899333ea1f129e87590cdee7e.tar.xz python-dmidecode-24af40698f1486c899333ea1f129e87590cdee7e.zip |
Ported fprintf() -> log_append() on XML functions
Diffstat (limited to 'src/dmixml.c')
-rw-r--r-- | src/dmixml.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/dmixml.c b/src/dmixml.c index 5d9f1a1..6f1fd77 100644 --- a/src/dmixml.c +++ b/src/dmixml.c @@ -41,6 +41,7 @@ #include <libxml/xpath.h> #include <libxml/xmlstring.h> +#include "dmilog.h" #include "dmixml.h" /** @@ -323,7 +324,7 @@ inline char *dmixml_GetNodeContent(xmlNode *node, const char *key) { * which of the elements to be extracted. * @return char* Points at the return buffer if a value is found, otherwise NULL is returned. */ -char *dmixml_GetXPathContent(char *buf, size_t buflen, xmlXPathObject *xpo, int idx) { +char *dmixml_GetXPathContent(Log_t *logp, char *buf, size_t buflen, xmlXPathObject *xpo, int idx) { memset(buf, 0, buflen); if( xpo == NULL ) { @@ -351,9 +352,9 @@ char *dmixml_GetXPathContent(char *buf, size_t buflen, xmlXPathObject *xpo, int break; default: - fprintf(stderr, "dmixml_GetXPathContent(...):: " - "Do not know how to handle XPath type %i\n", - xpo->type); + log_append(logp, LOG_WARNING, "dmixml_GetXPathContent(...):: " + "Do not know how to handle XPath type %i\n", + xpo->type); return NULL; } return buf; |