summaryrefslogtreecommitdiffstats
path: root/ui/ncurses
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-03-05 13:49:15 +0800
committerGeoff Levand <geoff@infradead.org>2013-03-05 06:06:17 -0800
commit6d51866f409e90274ff8cfb06b92a6c828692698 (patch)
treec67c25b6d98943298d0cb136d87ab19229634309 /ui/ncurses
parente7815dc27286b66bd67e4727a1a4f51a5b862b0d (diff)
downloadtalos-petitboot-6d51866f409e90274ff8cfb06b92a6c828692698.tar.gz
talos-petitboot-6d51866f409e90274ff8cfb06b92a6c828692698.zip
nc: Only expand debug macros if DEBUG is defined
To reduce debugging output from the UI Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
Diffstat (limited to 'ui/ncurses')
-rw-r--r--ui/ncurses/nc-scr.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/ncurses/nc-scr.h b/ui/ncurses/nc-scr.h
index 2374c20..bda2c32 100644
--- a/ui/ncurses/nc-scr.h
+++ b/ui/ncurses/nc-scr.h
@@ -22,9 +22,15 @@
#include <linux/input.h> /* This must be included before ncurses.h */
#include <ncurses.h>
+#ifdef DEBUG
#define DBG(fmt, args...) pb_log("DBG: " fmt, ## args)
#define DBGS(fmt, args...) \
pb_log("DBG:%s:%d: " fmt, __func__, __LINE__, ## args)
+#else
+#define DBG(fmt, args...)
+#define DBGS(fmt, args...)
+#endif
+
enum pb_nc_sig {
pb_cui_sig = 111,
OpenPOWER on IntegriCloud