Message ID | 20220505132301.124832-3-wangweiyang2@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Append line feed to files in securityfs | expand |
diff --git a/security/integrity/evm/evm_secfs.c b/security/integrity/evm/evm_secfs.c index 8a9db7dfca7e..6a46b62aabd4 100644 --- a/security/integrity/evm/evm_secfs.c +++ b/security/integrity/evm/evm_secfs.c @@ -45,7 +45,7 @@ static ssize_t evm_read_key(struct file *filp, char __user *buf, if (*ppos != 0) return 0; - sprintf(temp, "%d", (evm_initialized & ~EVM_SETUP_COMPLETE)); + sprintf(temp, "%d\n", (evm_initialized & ~EVM_SETUP_COMPLETE)); rc = simple_read_from_buffer(buf, count, ppos, temp, strlen(temp)); return rc;
There is no LF in /sys/kerne/security/evm output. It is little weird, so append LF to it. Example: / # cat /sys/kernel/security/evm 0/ # Signed-off-by: Wang Weiyang <wangweiyang2@huawei.com> --- security/integrity/evm/evm_secfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)