mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] introduce verbose debug
Date: Tue, 15 Jul 2014 15:45:10 +0200	[thread overview]
Message-ID: <1405431910-15431-1-git-send-email-s.hauer@pengutronix.de> (raw)

During debugging it sometimes helps to me even more verbose. This
adds an additional debug level for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/Kconfig   | 2 ++
 include/printk.h | 8 +++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/common/Kconfig b/common/Kconfig
index bba7f15..e7c22e5 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -676,6 +676,7 @@ config COMPILE_LOGLEVEL
 	  5    normal but significant condition (notice)
 	  6    informational (info)
 	  7    debug-level messages (debug)
+	  8    verbose debug messages (vdebug)
 
 config DEFAULT_LOGLEVEL
 	int "default loglevel"
@@ -692,6 +693,7 @@ config DEFAULT_LOGLEVEL
 	  5    normal but significant condition (notice)
 	  6    informational (info)
 	  7    debug-level messages (debug)
+	  8    verbose debug messages (vdebug)
 
 config DEBUG_INFO
 	bool
diff --git a/include/printk.h b/include/printk.h
index f550f07..4543156 100644
--- a/include/printk.h
+++ b/include/printk.h
@@ -9,8 +9,11 @@
 #define MSG_NOTICE     5    /* normal but significant condition */
 #define MSG_INFO       6    /* informational */
 #define MSG_DEBUG      7    /* debug-level messages */
+#define MSG_VDEBUG     8    /* verbose debug messages */
 
-#ifdef DEBUG
+#ifdef VERBOSE_DEBUG
+#define LOGLEVEL	MSG_VDEBUG
+#elif defined DEBUG
 #define LOGLEVEL	MSG_DEBUG
 #else
 #define LOGLEVEL	CONFIG_COMPILE_LOGLEVEL
@@ -46,6 +49,8 @@ int dev_printf(int level, const struct device_d *dev, const char *format, ...)
 	__dev_printf(6, (dev) , format , ## arg)
 #define dev_dbg(dev, format, arg...)		\
 	__dev_printf(7, (dev) , format , ## arg)
+#define dev_vdbg(dev, format, arg...)		\
+	__dev_printf(8, (dev) , format , ## arg)
 
 #define __pr_printk(level, format, args...) \
 	({	\
@@ -65,5 +70,6 @@ int dev_printf(int level, const struct device_d *dev, const char *format, ...)
 #define pr_info(fmt, arg...)	__pr_printk(6, pr_fmt(fmt), ##arg)
 #define pr_debug(fmt, arg...)	__pr_printk(7, pr_fmt(fmt), ##arg)
 #define debug(fmt, arg...)	__pr_printk(7, pr_fmt(fmt), ##arg)
+#define pr_vdebug(fmt, arg...)	__pr_printk(8, pr_fmt(fmt), ##arg)
 
 #endif
-- 
2.0.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

                 reply	other threads:[~2014-07-15 13:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1405431910-15431-1-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox