projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37d5227
)
udev: util - use log_level_from_string()
author
Tom Gundersen
<teg@jklm.no>
Mon, 15 Sep 2014 12:21:00 +0000
(14:21 +0200)
committer
Tom Gundersen
<teg@jklm.no>
Tue, 16 Sep 2014 10:12:56 +0000
(12:12 +0200)
src/libudev/libudev-util.c
patch
|
blob
|
history
diff --git
a/src/libudev/libudev-util.c
b/src/libudev/libudev-util.c
index a7125fa63f60964f1c5c7074167183395ad00afd..f3fdf3b5aa7843fd91789ab732ec370002f1150f 100644
(file)
--- a/
src/libudev/libudev-util.c
+++ b/
src/libudev/libudev-util.c
@@
-162,13
+162,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)