summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-09-15 14:21:00 +0200
committerAnthony G. Basile <blueness@gentoo.org>2014-09-17 20:30:35 -0400
commit1e446d862a89ba3475a9df516a9e57a590e9fcd8 (patch)
treeaa6de6b4f3c5d7c91c4e5b5470831b53b868237e
parentbe74fc7ab1d430fceae049b7f8e58bc913d9ecf3 (diff)
udev: util - use log_level_from_string()
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--src/libudev/libudev-util.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/libudev/libudev-util.c b/src/libudev/libudev-util.c
index 61eeb4e4d7..6268a8a4a7 100644
--- a/src/libudev/libudev-util.c
+++ b/src/libudev/libudev-util.c
@@ -266,13 +266,8 @@ int util_log_priority(const char *priority)
prio = strtol(priority, &endptr, 10);
if (endptr[0] == '\0' || isspace(endptr[0]))
return prio;
- if (startswith(priority, "err"))
- return LOG_ERR;
- if (startswith(priority, "info"))
- return LOG_INFO;
- if (startswith(priority, "debug"))
- return LOG_DEBUG;
- return 0;
+
+ return log_level_from_string(priority);
}
size_t util_path_encode(const char *src, char *dest, size_t size)