diff --git a/src/utils/error.c b/src/utils/error.c
index f940be6d232b05eb5eceff1b08f6aa13d62642ac..f0a48271c91d75b4a60dfb36b6203374887e83a1 100644 (file)
--- a/src/utils/error.c
+++ b/src/utils/error.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
/*
* private data types
return ctx->prio;
} /* sdb_error_get_prio */
+int
+sdb_error_parse_priority(char *prio)
+{
+ if (! strcasecmp(prio, "EMERG"))
+ return SDB_LOG_EMERG;
+ else if (! strcasecmp(prio, "ERROR"))
+ return SDB_LOG_ERR;
+ else if (! strcasecmp(prio, "WARNING"))
+ return SDB_LOG_WARNING;
+ else if (! strcasecmp(prio, "NOTICE"))
+ return SDB_LOG_NOTICE;
+ else if (! strcasecmp(prio, "INFO"))
+ return SDB_LOG_INFO;
+ else if (! strcasecmp(prio, "DEBUG"))
+ return SDB_LOG_DEBUG;
+ return -1;
+} /* sdb_error_parse_priority */
+
char *
sdb_strerror(int errnum, char *strerrbuf, size_t buflen)
{