Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53b90c0c authored by Borislav Petkov's avatar Borislav Petkov Committed by Ingo Molnar
Browse files

kexec/crash: Say which char is the unrecognized



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

Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Reviewed-by: default avatarDave Young <dyoung@redhat.com>
Reviewed-by: default avatarJoerg Roedel <jroedel@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Baoquan He <bhe@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Salter <msalter@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: WANG Chao <chaowang@redhat.com>
Cc: jerry_hoemann@hp.com
Link: http://lkml.kernel.org/r/1445246268-26285-8-git-send-email-bp@alien8.de


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 6f376057
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
	}