diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-10-29 16:50:39 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-12 23:25:40 +0900 |
commit | 46f0fbd8fd8ed1428b6f038b88375935e722eeaa (patch) | |
tree | 0c034f3c25b5feb0a15aa5bd985379fd2fa4d3f6 /src/libudev | |
parent | 9d9264ba39f797d20100c8acfda3df895ab5aaa2 (diff) | |
download | systemd-46f0fbd8fd8ed1428b6f038b88375935e722eeaa.tar.gz |
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')
-rw-r--r-- | src/libudev/libudev-private.h | 1 | ||||
-rw-r--r-- | src/libudev/libudev-util.c | 16 |
2 files changed, 0 insertions, 17 deletions
diff --git a/src/libudev/libudev-private.h b/src/libudev/libudev-private.h index bf06e3add6..fdf87acf9e 100644 --- a/src/libudev/libudev-private.h +++ b/src/libudev/libudev-private.h @@ -99,7 +99,6 @@ void udev_list_entry_set_num(struct udev_list_entry *list_entry, int num); #define UTIL_NAME_SIZE 512 #define UTIL_LINE_SIZE 16384 #define UDEV_ALLOWED_CHARS_INPUT "/ $%?," -int util_log_priority(const char *priority); size_t util_path_encode(const char *src, char *dest, size_t size); int util_replace_whitespace(const char *str, char *to, size_t len); int util_replace_chars(char *str, const char *white); 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; |