From 3e2677a31ea601d49977bc9ed6b29523a9898534 Mon Sep 17 00:00:00 2001 From: "greg@kroah.com" Date: Wed, 22 Oct 2003 19:38:59 -0700 Subject: [PATCH] [PATCH] make libsysfs spit debug messages to the same place as the rest of udev. --- libsysfs/sysfs.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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_ */ -- 2.30.2