Cc: <linux-tiny@...>, Tim Bird <tim.bird@...>, linux kernel <linux-kernel@...>, CE Linux Developers List <celinux-dev@...>, Michael Opdenacker <michael@...>
On Thu, Sep 20, 2007 at 03:38:42PM -0500, Rob Landley wrote:
Given that
a) there're plenty of printks without any KERN_* bloat,
b) there're printks that SHOULD NOT have KERN_* bloat,
c) debugging-by-printk method is widely used and this will force
additional typing, head-scratching and swear words
d) time wasted on pointless discussions whether some particular
printk ALERT or CRIT
e) flag day for printk,
I think that this idea is not worth it.
Ick.
Alexey "ignore_loglevel" Dobriyan
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -52,6 +52,7 @@ extern const char linux_proc_banner[];
*/
#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
+#ifdef CONFIG_FOO
#define KERN_EMERG "<0>" /* system is unusable */
#define KERN_ALERT "<1>" /* action must be taken immediately */
#define KERN_CRIT "<2>" /* critical conditions */
@@ -59,6 +60,15 @@ extern const char linux_proc_banner[];
#define KERN_WARNING "<4>" /* warning conditions */
#define KERN_NOTICE "<5>" /* normal but significant condition */
#define KERN_INFO "<6>" /* informational */
+#else
+#define KERN_EMERG ""
+#define KERN_ALERT ""
+#define KERN_CRIT ""
+#define KERN_ERR ""
+#define KERN_WARNING ""
+#define KERN_NOTICE ""
+#define KERN_INFO ""
+#endif
#define KERN_DEBUG "<7>" /* debug-level messages */
extern int console_printk[];
-