Skip to content

Commit 15e9503

Browse files
mhiramatrostedt
authored andcommitted
tools/bootconfig: Remove unneeded error message silencer
Remove error message silent knob, we don't need it anymore because we can check if there is a bootconfig by checking the magic word. If there is a magic word, but failed to load a bootconfig from initrd, there is a real problem. Link: http://lkml.kernel.org/r/158220113256.26565.14264598654427773104.stgit@devnote2 Signed-off-by: Masami Hiramatsu <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 85c46b7 commit 15e9503

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

tools/bootconfig/include/linux/printk.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44

55
#include <stdio.h>
66

7-
/* controllable printf */
8-
extern int pr_output;
9-
#define printk(fmt, ...) \
10-
(pr_output ? printf(fmt, ##__VA_ARGS__) : 0)
7+
#define printk(fmt, ...) printf(fmt, ##__VA_ARGS__)
118

129
#define pr_err printk
1310
#define pr_warn printk

tools/bootconfig/main.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#include <linux/kernel.h>
1515
#include <linux/bootconfig.h>
1616

17-
int pr_output = 1;
18-
1917
static int xbc_show_array(struct xbc_node *node)
2018
{
2119
const char *val;
@@ -227,13 +225,7 @@ int delete_xbc(const char *path)
227225
return -errno;
228226
}
229227

230-
/*
231-
* Suppress error messages in xbc_init() because it can be just a
232-
* data which concidentally matches the size and checksum footer.
233-
*/
234-
pr_output = 0;
235228
size = load_xbc_from_initrd(fd, &buf);
236-
pr_output = 1;
237229
if (size < 0) {
238230
ret = size;
239231
pr_err("Failed to load a boot config from initrd: %d\n", ret);

0 commit comments

Comments
 (0)