提交 105ab7c9 编写于 作者: X Xiongfeng Wang 提交者: Yang Yingliang

sunrpc: add missing newline when printing parameter 'pool_mode' by sysfs

mainline inclusion
from mainline-5.8-rc1
commit 746c6237
category: bugfix
bugzilla: 51810
CVE: NA

-------------------------------------------------
When I cat parameter '/sys/module/sunrpc/parameters/pool_mode', it
displays as follows. It is better to add a newline for easy reading.

[root@hulk-202 ~]# cat /sys/module/sunrpc/parameters/pool_mode
global[root@hulk-202 ~]#
Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
(cherry picked from commit 746c6237)
Signed-off-by: NYufen Wang <wangyufen@huawei.com>
Reviewed-by: NYue Haibing <yuehaibing@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 d4997fb3
...@@ -87,15 +87,15 @@ param_get_pool_mode(char *buf, const struct kernel_param *kp) ...@@ -87,15 +87,15 @@ param_get_pool_mode(char *buf, const struct kernel_param *kp)
switch (*ip) switch (*ip)
{ {
case SVC_POOL_AUTO: case SVC_POOL_AUTO:
return strlcpy(buf, "auto", 20); return strlcpy(buf, "auto\n", 20);
case SVC_POOL_GLOBAL: case SVC_POOL_GLOBAL:
return strlcpy(buf, "global", 20); return strlcpy(buf, "global\n", 20);
case SVC_POOL_PERCPU: case SVC_POOL_PERCPU:
return strlcpy(buf, "percpu", 20); return strlcpy(buf, "percpu\n", 20);
case SVC_POOL_PERNODE: case SVC_POOL_PERNODE:
return strlcpy(buf, "pernode", 20); return strlcpy(buf, "pernode\n", 20);
default: default:
return sprintf(buf, "%d", *ip); return sprintf(buf, "%d\n", *ip);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册