summaryrefslogtreecommitdiff
path: root/tools/bootconfig/include/linux/printk.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2020-01-10 19:03:56 +0300
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2020-01-13 21:19:39 +0300
commit950313ebf79c65702f4c15d29328147766d1f1fd (patch)
tree859764b9a481c2f383c07ac0f9c2b928fd0c18a5 /tools/bootconfig/include/linux/printk.h
parent7684b8582c24537dbe079a7d40e1d7e57ca56939 (diff)
downloadlinux-950313ebf79c65702f4c15d29328147766d1f1fd.tar.xz
tools: bootconfig: Add bootconfig command
Add "bootconfig" command which operates the bootconfig config-data on initrd image. User can add/delete/verify the boot config on initrd image using this command. e.g. Add a boot config to initrd image # bootconfig -a myboot.conf /boot/initrd.img Remove it. # bootconfig -d /boot/initrd.img Or verify (and show) it. # bootconfig /boot/initrd.img Link: http://lkml.kernel.org/r/157867223582.17873.14342161849213219982.stgit@devnote2 Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> [ Removed extra blank line at end of bootconfig.c ] Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'tools/bootconfig/include/linux/printk.h')
-rw-r--r--tools/bootconfig/include/linux/printk.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/bootconfig/include/linux/printk.h b/tools/bootconfig/include/linux/printk.h
new file mode 100644
index 000000000000..017bcd6912a5
--- /dev/null
+++ b/tools/bootconfig/include/linux/printk.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _SKC_LINUX_PRINTK_H
+#define _SKC_LINUX_PRINTK_H
+
+#include <stdio.h>
+
+/* controllable printf */
+extern int pr_output;
+#define printk(fmt, ...) \
+ (pr_output ? printf(fmt, __VA_ARGS__) : 0)
+
+#define pr_err printk
+#define pr_warn printk
+#define pr_info printk
+#define pr_debug printk
+
+#endif