diff options
author | greg@kroah.com <greg@kroah.com> | 2003-10-22 19:38:59 -0700 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:05:23 -0700 |
commit | 3e2677a31ea601d49977bc9ed6b29523a9898534 (patch) | |
tree | 2ca0e1ecc18358cf3acb68027528954503dfdc59 | |
parent | bf0314e326319354c857a7e9150460ec239fb07d (diff) |
[PATCH] make libsysfs spit debug messages to the same place as the rest of udev.
-rw-r--r-- | libsysfs/sysfs.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libsysfs/sysfs.h b/libsysfs/sysfs.h index 00599954fd..e39b7413cb 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 <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_ */ |