kexec/crash: Say which char is the unrecognized
authorBorislav Petkov <[email protected]>
Mon, 19 Oct 2015 09:17:47 +0000 (11:17 +0200)
committerIngo Molnar <[email protected]>
Wed, 21 Oct 2015 09:10:57 +0000 (11:10 +0200)
It is helpful when the crashkernel cmdline parsing routines
actually say which character is the unrecognized one. Make them
do so.

Signed-off-by: Borislav Petkov <[email protected]>
Reviewed-by: Dave Young <[email protected]>
Reviewed-by: Joerg Roedel <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Mark Salter <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Vivek Goyal <[email protected]>
Cc: WANG Chao <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
kernel/kexec_core.c

index 201b45327804d230edc9017eef6c07805ae3f8d3..bd9f8a03cefa4ef05c08d54a357910286487afd8 100644 (file)
@@ -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;
        }