ipmi: add a newline when printing parameter 'panic_op' by sysfs
PATCH 1/1 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 <[email protected]>
--- drivers/char/ipmi/ipmi_msghandler.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/char/ipmi/ipmi_msghandler.c +4 -4
@@ -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 ; }
Signature · 1 line
1.7.12.4
Quoted 5 lines · Xiongfeng Wang
When I cat
ipmi_msghandlerparameter '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):/#
Thanks, it's in my for-next queue.
-corey
Quoted 37 lines
Signed-off-by Xiongfeng Wang <[email protected]>--- drivers/char/ipmi/ipmi_msghandler.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/char/ipmi/ipmi_msghandler.c +4
-4@@ -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 ; }Signature · 1 line
1.7.12.4