Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp618301pxk; Thu, 3 Sep 2020 08:22:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyl9hIHGGaXF10PCIt7I7a3YcGDaLggVE/gszrD2xfmOd+wD5Wk79ZvfC9sm0QJyLySkM5b X-Received: by 2002:a50:d9c1:: with SMTP id x1mr3730883edj.283.1599146530503; Thu, 03 Sep 2020 08:22:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599146530; cv=none; d=google.com; s=arc-20160816; b=dgJyAIAONhLhFcGtPw0gq3nJ74WAVtmGkyoBzota1AlLH6TzYC9FyQZHdR/3G+U+h/ 5htZTaFmA6TDyEwndJ7kdi3ebWeqUU20yvIvjUrlnafq4a7WDv8drbHlxmN1NGlRfUu2 pgsMSkIhs4hTqn749cGiKXPxWQWZ7+ga5tDZr7dZWTGQw9E78XqlJLXQ8pGLndqBChBA 946mYozb+CD3RqTws1ZKUn6+1bn3Y7oW/xW2uXEUqfI8WE1Hbhd0QSkXptJpeApqPdY5 ToZVcYsSjS085ujFChYHfwjOfB0lhDcLIphzSuvPe3s/Fr5p5+FlO1DWbDqTYGefvdbG nv2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=wlZGrP0o8abeQerYHP7Tkt4QTjr4IxsbDuSTg+uL3kE=; b=iScv6XiobrJE4x3pqwDZRtH+ZME4Tt9cddsb5SvwuKhSVoRRnibOJic5DoSFO38Hzj AL+jmQR4YJ6QqXzcWYSrDH549wvwLvPq/jBMTWoBfNMfXy9IsD8p7gC7y2o2J0YMrm5x O346jFp6LfgA32xW1VGO8kOsGcKGACLaFhBbyErwQqbAcXu2wdqwkvsmZ24BeDZCVTdH MAmWA0tzrbcj/2EhXitzOpbW6FQTF8TkkFZHkDpowceE4p54trClU8i4tjyL8gUrEpSe D+/4rogHHSjbQPMW4aQwE6VBloVUFzOmD4ykxogrFGr3SFDaiOR3Y2H71jhgLCg9ll2w RCuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si2368354ejd.6.2020.09.03.08.21.47; Thu, 03 Sep 2020 08:22:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728506AbgICPVG (ORCPT + 99 others); Thu, 3 Sep 2020 11:21:06 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:10759 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728547AbgICLZL (ORCPT ); Thu, 3 Sep 2020 07:25:11 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 41D9C69B637213C69AA1; Thu, 3 Sep 2020 19:08:41 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Thu, 3 Sep 2020 19:08:32 +0800 From: Xiongfeng Wang To: , , CC: , , Subject: [PATCH] ipmi: add a newline when printing parameter 'panic_op' by sysfs Date: Thu, 3 Sep 2020 19:01:13 +0800 Message-ID: <1599130873-2402-1-git-send-email-wangxiongfeng2@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When I cat ipmi_msghandler parameter 'panic_op' by sysfs, it displays as follows. It's better to add a newline for easy reading. root@(none):/# cat /sys/module/ipmi_msghandler/parameters/panic_op noneroot@(none):/# Signed-off-by: Xiongfeng Wang --- drivers/char/ipmi/ipmi_msghandler.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 737c0b6..6ebb549 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -89,19 +89,19 @@ static int panic_op_read_handler(char *buffer, const struct kernel_param *kp) { switch (ipmi_send_panic_event) { case IPMI_SEND_PANIC_EVENT_NONE: - strcpy(buffer, "none"); + strcpy(buffer, "none\n"); break; case IPMI_SEND_PANIC_EVENT: - strcpy(buffer, "event"); + strcpy(buffer, "event\n"); break; case IPMI_SEND_PANIC_EVENT_STRING: - strcpy(buffer, "string"); + strcpy(buffer, "string\n"); break; default: - strcpy(buffer, "???"); + strcpy(buffer, "???\n"); break; } -- 1.7.12.4