summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorolh@suse.de <olh@suse.de>2003-09-24 20:56:17 -0700
committerGreg KH <gregkh@suse.de>2005-04-26 21:01:40 -0700
commite436917d9c7a157d62510fee9a4f80c1f3f77abf (patch)
treeb3a46c52168005dd470b2dac1f5b72a6250b5daf
parent99bec174973b08343a0daefe35bbcdc1f263f192 (diff)
[PATCH] print udev pid
makes debugging easier.
-rw-r--r--logging.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/logging.c b/logging.c
index e074b1562c..1ca3aed1a9 100644
--- a/logging.c
+++ b/logging.c
@@ -21,16 +21,22 @@
*/
#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;
}