diff options
Diffstat (limited to 'src/libudev/libudev.c')
-rw-r--r-- | src/libudev/libudev.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libudev/libudev.c b/src/libudev/libudev.c index beb9a65481..5d3ad50411 100644 --- a/src/libudev/libudev.c +++ b/src/libudev/libudev.c @@ -192,7 +192,13 @@ _public_ struct udev *udev_new(void) } if (streq(key, "udev_log")) { - udev_set_log_priority(udev, util_log_priority(val)); + int prio; + + prio = util_log_priority(val); + if (prio < 0) + udev_err(udev, "/etc/udev/udev.conf:%u: invalid logging level '%s', ignoring.\n", line_nr, val); + else + udev_set_log_priority(udev, prio); continue; } } |