From: greg@kroah.com Date: Thu, 23 Oct 2003 02:38:59 +0000 (-0700) Subject: [PATCH] make libsysfs spit debug messages to the same place as the rest of udev. X-Git-Tag: 005~16 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=3e2677a31ea601d49977bc9ed6b29523a9898534 [PATCH] make libsysfs spit debug messages to the same place as the rest of udev. --- diff --git a/libsysfs/sysfs.h b/libsysfs/sysfs.h index 00599954f..e39b7413c 100644 --- a/libsysfs/sysfs.h +++ b/libsysfs/sysfs.h @@ -41,9 +41,17 @@ extern int isascii(int c); /* Debugging */ #ifdef DEBUG -#define dprintf(format, arg...) fprintf(stderr, format, ## arg) +#include +#define dprintf(format, arg...) \ + do { \ + log_message (LOG_DEBUG , "%s: " format , __FUNCTION__ , ## arg); \ + } while (0) #else #define dprintf(format, arg...) do { } while (0) #endif +extern int log_message (int level, const char *format, ...) + __attribute__ ((format (printf, 2, 3))); + + #endif /* _SYSFS_H_ */