From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753550AbbJSJR7 (ORCPT ); Mon, 19 Oct 2015 05:17:59 -0400 Received: from mail.skyhub.de ([78.46.96.112]:33236 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753493AbbJSJR5 (ORCPT ); Mon, 19 Oct 2015 05:17:57 -0400 From: Borislav Petkov To: Ingo Molnar Cc: LKML Subject: [PATCH 7/8] kexec/crash: Say which char is the unrecognized Date: Mon, 19 Oct 2015 11:17:47 +0200 Message-Id: <1445246268-26285-8-git-send-email-bp@alien8.de> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1445246268-26285-1-git-send-email-bp@alien8.de> References: <1445246268-26285-1-git-send-email-bp@alien8.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Borislav Petkov It is helpful when the crashkernel cmdline parsing routines actually say which character is the unrecognized one. Make them do so. Reviewed-by: Dave Young Reviewed-by: Joerg Roedel Cc: Andrew Morton Cc: Andy Lutomirski Cc: Baoquan He Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: jerry_hoemann@hp.com Cc: Jiri Kosina Cc: Juergen Gross Cc: Mark Salter Cc: Thomas Gleixner Cc: Vivek Goyal Cc: WANG Chao Cc: x86-ml Signed-off-by: Borislav Petkov --- 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