]> err.no Git - systemd/commitdiff
udevd: do not use syslog if --verbose (debugging) is used
authorKay Sievers <kay.sievers@vrfy.org>
Sat, 23 Jun 2007 15:35:37 +0000 (17:35 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Sat, 23 Jun 2007 15:35:37 +0000 (17:35 +0200)
udevd.c

diff --git a/udevd.c b/udevd.c
index 23df5359bb206b451dc588bfa5ee2d7add500b58..0999b5fa756bfc7b553dd413fa9672ca388dc9be 100644 (file)
--- a/udevd.c
+++ b/udevd.c
@@ -76,15 +76,16 @@ void log_message(int priority, const char *format, ...)
        if (priority > udev_log_priority)
                return;
 
-       va_start(args, format);
-       vsyslog(priority, format, args);
-       va_end(args);
-
        if (verbose) {
+               printf("[%d] ", (int) getpid());
                va_start(args, format);
                vprintf(format, args);
                va_end(args);
                printf("\n");
+       } else {
+               va_start(args, format);
+               vsyslog(priority, format, args);
+               va_end(args);
        }
 }