From: greg@kroah.com Date: Fri, 11 Apr 2003 03:04:38 +0000 (-0700) Subject: [PATCH] enabled debugging. X-Git-Tag: 001~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a507a0157240640b4fbf096577a3c2d9729511dd;p=systemd [PATCH] enabled debugging. --- diff --git a/Makefile b/Makefile index c73ee42a..c31f61d8 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ # Set the following to `true' to make a debuggable build. # Leave this set to `false' for production use. -DEBUG = false +DEBUG = true ROOT = udev diff --git a/udev.h b/udev.h index ef7175ea..83004bb7 100644 --- a/udev.h +++ b/udev.h @@ -26,7 +26,10 @@ #ifdef DEBUG #include - #define dbg(format, arg...) do { log_message (LOG_DEBUG, __FUNCTION__ ": " format, ## arg); } while (0) +#define dbg(format, arg...) \ + do { \ + log_message (LOG_DEBUG , "%s: " format , __FUNCTION__ , ## arg); \ + } while (0) #else #define dbg(format, arg...) do { } while (0) #endif @@ -37,5 +40,8 @@ #define MKNOD "/bin/mknod" +extern int log_message (int level, const char *format, ...); + + #endif