chiark / gitweb /
[PATCH] print udev pid
authorolh@suse.de <olh@suse.de>
Thu, 25 Sep 2003 03:56:17 +0000 (20:56 -0700)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:01:40 +0000 (21:01 -0700)
makes debugging easier.

logging.c

index e074b15..1ca3aed 100644 (file)
--- a/logging.c
+++ b/logging.c
  */
 
 #include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
 #include <syslog.h>
 #include "udev.h"
 
 #ifdef DEBUG
 
 static int logging_init = 0;
+static unsigned char udev_logname[42];
 
 static void init_logging (void)
 {
-       openlog ("udev", 0, LOG_DAEMON);
+       snprintf(udev_logname,42,"udev[%d]", getpid());
+
+       openlog (udev_logname, 0, LOG_DAEMON);
        logging_init = 1;
 }