summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorXiongfeng Wang <wangxiongfeng2@huawei.com>2020-09-03 19:01:13 +0800
committerCorey Minyard <cminyard@mvista.com>2020-09-03 13:34:35 -0500
commit8a00e56a14a706cdca9b2a575e7a709b641f3ce0 (patch)
treea6bb4c4fa6a97237c58a7fcd8d099fc5279a0447 /drivers/char
parent83dea128567250ee8dee6a5f1f9913f617bfc153 (diff)
ipmi: add a newline when printing parameter 'panic_op' by sysfs
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 <wangxiongfeng2@huawei.com> Message-Id: <1599130873-2402-1-git-send-email-wangxiongfeng2@huawei.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index e1814b6a1225..ed888d5a33ae 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;
}