udevd: force --debug mode to stderr

https://github.com/systemd/systemd/issues/462
This commit is contained in:
Kay Sievers 2015-07-01 19:20:59 +02:00
parent 3723263f49
commit 78d3e041a5
1 changed files with 3 additions and 1 deletions

View File

@ -1625,8 +1625,10 @@ int main(int argc, char *argv[]) {
if (r < 0)
log_warning_errno(r, "failed to parse kernel command line, ignoring: %m");
if (arg_debug)
if (arg_debug) {
log_set_target(LOG_TARGET_CONSOLE);
log_set_max_level(LOG_DEBUG);
}
if (getuid() != 0) {
r = log_error_errno(EPERM, "root privileges required");