]> err.no Git - systemd/commitdiff
[PATCH] make libsysfs spit debug messages to the same place as the rest of udev.
authorgreg@kroah.com <greg@kroah.com>
Thu, 23 Oct 2003 02:38:59 +0000 (19:38 -0700)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:05:23 +0000 (21:05 -0700)
libsysfs/sysfs.h

index 00599954fd757332ce4ba8793429fe3b51e1fd11..e39b7413cbb91d5759988e25111f2fd68cb1da4d 100644 (file)
@@ -41,9 +41,17 @@ extern int isascii(int c);
 
 /* Debugging */
 #ifdef DEBUG
-#define dprintf(format, arg...) fprintf(stderr, format, ## arg)
+#include <syslog.h>
+#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_ */