lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1291277105-31758-2-git-send-email-ying.huang@intel.com>
Date:	Thu,  2 Dec 2010 16:05:02 +0800
From:	Huang Ying <ying.huang@...el.com>
To:	Len Brown <lenb@...nel.org>
Cc:	linux-kernel@...r.kernel.org, Andi Kleen <andi@...stfloor.org>,
	Tony Luck <tony.luck@...el.com>, ying.huang@...el.com,
	linux-acpi@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>
Subject: [PATCH -v3 1/4] printk, Add pr_pfx for library functions

For library functions doing printk, the log level and line prefix
usually need to be specified by the caller. So this patch adds
"pr_pfx" to make the life of these library functions easier.

Signed-off-by: Huang Ying <ying.huang@...el.com>
---
 include/linux/printk.h |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -202,6 +202,13 @@ extern void print_hex_dump_bytes(const c
 #endif
 
 /*
+ * Used by library functions, where log level and line prefix need to
+ * be specifieded by the caller.
+ */
+#define pr_pfx(pfx, fmt, ...) \
+	printk("%s" fmt, pfx, ##__VA_ARGS__)
+
+/*
  * ratelimited messages with local ratelimit_state,
  * no local ratelimit_state used in the !PRINTK case
  */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ