[PATCH] make libsysfs spit debug messages to the same place as the rest of udev.
This commit is contained in:
parent
bf0314e326
commit
3e2677a31e
|
@ -41,9 +41,17 @@ extern int isascii(int c);
|
||||||
|
|
||||||
/* Debugging */
|
/* Debugging */
|
||||||
#ifdef DEBUG
|
#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
|
#else
|
||||||
#define dprintf(format, arg...) do { } while (0)
|
#define dprintf(format, arg...) do { } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern int log_message (int level, const char *format, ...)
|
||||||
|
__attribute__ ((format (printf, 2, 3)));
|
||||||
|
|
||||||
|
|
||||||
#endif /* _SYSFS_H_ */
|
#endif /* _SYSFS_H_ */
|
||||||
|
|
Loading…
Reference in New Issue