summaryrefslogtreecommitdiff
path: root/libudev
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-05-28 12:07:27 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-05-28 12:07:27 +0200
commitc830e98d6a8e43b1b5cc8470aa750960989778bc (patch)
tree1ba2eb3968308f4c9249e1f0c264e4655b51ca35 /libudev
parent7bf44da99c0526bc46beff451353ca15ff7ce1bd (diff)
udevd: read debug settings from kernel commandline
Diffstat (limited to 'libudev')
-rw-r--r--libudev/libudev-util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libudev/libudev-util.c b/libudev/libudev-util.c
index 3a67b0cd5d..030b78cd22 100644
--- a/libudev/libudev-util.c
+++ b/libudev/libudev-util.c
@@ -87,13 +87,13 @@ int util_log_priority(const char *priority)
int prio;
prio = strtol(priority, &endptr, 10);
- if (endptr[0] == '\0')
+ if (endptr[0] == '\0' || isspace(endptr[0]))
return prio;
if (strncmp(priority, "err", 3) == 0)
return LOG_ERR;
- if (strcmp(priority, "info") == 0)
+ if (strncmp(priority, "info", 4) == 0)
return LOG_INFO;
- if (strcmp(priority, "debug") == 0)
+ if (strncmp(priority, "debug", 5) == 0)
return LOG_DEBUG;
return 0;
}