lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1599132573-33818-1-git-send-email-wangxiongfeng2@huawei.com>
Date:   Thu, 3 Sep 2020 19:29:33 +0800
From:   Xiongfeng Wang <wangxiongfeng2@...wei.com>
To:     <martin.petersen@...cle.com>
CC:     <linux-scsi@...r.kernel.org>, <target-devel@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <wangxiongfeng2@...wei.com>
Subject: [PATCH] scsi: target: tcmu: add a missing newline when printing parameters

When I cat module paramter 'global_max_data_area_mb' by sysfs, it
displays as follows. It's better to add a newline for easy reading.

root@(none):/# cat /sys/module/target_core_user/parameters/global_max_data_area_mb
2048noneroot@(none):/#

Signed-off-by: Xiongfeng Wang <wangxiongfeng2@...wei.com>
---
 drivers/target/target_core_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
index 9b75923..9775670 100644
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -242,7 +242,7 @@ static int tcmu_set_global_max_data_area(const char *str,
 static int tcmu_get_global_max_data_area(char *buffer,
 					 const struct kernel_param *kp)
 {
-	return sprintf(buffer, "%d", TCMU_BLOCKS_TO_MBS(tcmu_global_max_blocks));
+	return sprintf(buffer, "%d\n", TCMU_BLOCKS_TO_MBS(tcmu_global_max_blocks));
 }
 
 static const struct kernel_param_ops tcmu_global_max_data_area_op = {
-- 
1.7.12.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ