diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-10-29 08:50:39 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-12 15:25:40 +0100 |
commit | 46f0fbd8fd8ed1428b6f038b88375935e722eeaa (patch) | |
tree | 0c034f3c25b5feb0a15aa5bd985379fd2fa4d3f6 /src/libudev/libudev-util.c | |
parent | udev: use parse_sec() to parse --event-timeout option (diff) | |
download | systemd-46f0fbd8fd8ed1428b6f038b88375935e722eeaa.tar.xz systemd-46f0fbd8fd8ed1428b6f038b88375935e722eeaa.zip |
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'.
Diffstat (limited to 'src/libudev/libudev-util.c')
-rw-r--r-- | src/libudev/libudev-util.c | 16 |
1 files changed, 0 insertions, 16 deletions
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; |