Using condlog() for sysfs debugging output
authorHannes Reinecke <hare@suse.de>
Fri, 19 Dec 2008 08:43:23 +0000 (09:43 +0100)
committerChristophe Varoqui <christophe.varoqui@free.fr>
Tue, 21 Apr 2009 23:14:56 +0000 (01:14 +0200)
The sysfs code still used 'printf' for debugging. Changed that
to using condlog().

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/sysfs.c
libmultipath/sysfs.h

index 9f11b95..c0d4d5f 100644 (file)
@@ -33,6 +33,7 @@
 #include "sysfs.h"
 #include "list.h"
 #include "util.h"
+#include "debug.h"
 
 char sysfs_path[PATH_SIZE];
 
index 2cd762f..620962c 100644 (file)
@@ -6,7 +6,7 @@
 #define _LIBMULTIPATH_SYSFS_H
 
 #ifdef DEBUG
-# define dbg(format, args...) printf(format "\n", ##args)
+# define dbg(format, args...) condlog(4, format, ##args)
 #else
 # define dbg(format, args...) do {} while (0)
 #endif