[PATCH 5/5] kexec/crash: Say which char is the unrecognized

From: Borislav Petkov
Date: Thu Oct 15 2015 - 04:22:31 EST


From: Borislav Petkov <bp@xxxxxxx>

It is helpful when the crashkernel cmdline parsing routines actually say
which character is the unrecognized one. Make them do so.

Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
Cc: Baoquan He <bhe@xxxxxxxxxx>
Cc: Dave Young <dyoung@xxxxxxxxxx>
Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: jerry_hoemann@xxxxxx
Cc: Jiri Kosina <jkosina@xxxxxxx>
Cc: Joerg Roedel <jroedel@xxxxxxx>
Cc: Juergen Gross <jgross@xxxxxxxx>
Cc: Mark Salter <msalter@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Vivek Goyal <vgoyal@xxxxxxxxxx>
Cc: WANG Chao <chaowang@xxxxxxxxxx>
Cc: x86-ml <x86@xxxxxxxxxx>
Signed-off-by: Borislav Petkov <bp@xxxxxxx>
---
kernel/kexec_core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
index 201b45327804..bd9f8a03cefa 100644
--- a/kernel/kexec_core.c
+++ b/kernel/kexec_core.c
@@ -1149,7 +1149,7 @@ static int __init parse_crashkernel_simple(char *cmdline,
if (*cur == '@')
*crash_base = memparse(cur+1, &cur);
else if (*cur != ' ' && *cur != '\0') {
- pr_warn("crashkernel: unrecognized char\n");
+ pr_warn("crashkernel: unrecognized char: %c\n", *cur);
return -EINVAL;
}

@@ -1186,12 +1186,12 @@ static int __init parse_crashkernel_suffix(char *cmdline,

/* check with suffix */
if (strncmp(cur, suffix, strlen(suffix))) {
- pr_warn("crashkernel: unrecognized char\n");
+ pr_warn("crashkernel: unrecognized char: %c\n", *cur);
return -EINVAL;
}
cur += strlen(suffix);
if (*cur != ' ' && *cur != '\0') {
- pr_warn("crashkernel: unrecognized char\n");
+ pr_warn("crashkernel: unrecognized char: %c\n", *cur);
return -EINVAL;
}

--
2.3.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/