[RFC v0 4/9] error: Add debug() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Daniel Wagner <daniel.wagner@xxxxxxxxxxxx>
---
 src/include/error.h |  1 +
 src/lib/error.c     | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/src/include/error.h b/src/include/error.h
index 1e33f6c..ae05a2e 100644
--- a/src/include/error.h
+++ b/src/include/error.h
@@ -10,6 +10,7 @@ void err_exit(int err, char *fmt, ...);
 void err_msg(char *fmt, ...);
 void err_msg_n(int err, char *fmt, ...);
 void err_quit(char *fmt, ...);
+void debug(char *fmt, ...);
 void info(char *fmt, ...);
 void warn(char *fmt, ...);
 void fatal(char *fmt, ...);
diff --git a/src/lib/error.c b/src/lib/error.c
index 1b5de5d..0cef245 100644
--- a/src/lib/error.c
+++ b/src/lib/error.c
@@ -46,6 +46,16 @@ void err_quit(char *fmt, ...)
 	exit(1);
 }
 
+void debug(char *fmt, ...)
+{
+	va_list ap;
+
+	va_start(ap, fmt);
+	fputs("DEBUG: ", stderr);
+	err_doit(0, fmt, ap);
+	va_end(ap);
+}
+
 void info(char *fmt, ...)
 {
 	va_list ap;
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux