From 46f0fbd8fd8ed1428b6f038b88375935e722eeaa Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 29 Oct 2018 16:50:39 +0900 Subject: udev: drop util_log_priority() and use log_level_from_string() The function util_log_priority() is almost same as log_level_from_string(). The difference between them is only that util_log_priority() accepts such that '3 hogehoge'. --- src/libudev/libudev-util.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/libudev/libudev-util.c') diff --git a/src/libudev/libudev-util.c b/src/libudev/libudev-util.c index 3bb27fbc4e..df5223e5a9 100644 --- a/src/libudev/libudev-util.c +++ b/src/libudev/libudev-util.c @@ -12,7 +12,6 @@ #include "MurmurHash2.h" #include "device-nodes.h" #include "libudev-private.h" -#include "syslog-util.h" #include "utf8.h" /** @@ -84,21 +83,6 @@ int util_resolve_subsys_kernel(const char *string, return 0; } -int util_log_priority(const char *priority) { - char *endptr; - int prio; - - prio = strtoul(priority, &endptr, 10); - if (endptr[0] == '\0' || isspace(endptr[0])) { - if (prio >= 0 && prio <= 7) - return prio; - else - return -ERANGE; - } - - return log_level_from_string(priority); -} - size_t util_path_encode(const char *src, char *dest, size_t size) { size_t i, j; -- cgit v1.2.3