scsi: target: core: add line break to status show
Subsystems (2)
PATCH 1/1 scsi: target: core: add line break to status show
To ensure the output is not tangled with the shell prompt, add a line break to clearly display the status.
--- drivers/target/target_core_stat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/target/target_core_stat.c +2 -2
@@ -117,9 +117,9 @@ static ssize_t target_stat_tgt_status_show(struct config_item *item, char *page) {if (to_stat_tgt_dev (item)->export_count) -return snprintf (page,PAGE_SIZE ,"activated" ); +return snprintf (page,PAGE_SIZE ,"activated\n" );else -return snprintf (page,PAGE_SIZE ,"deactivated" ); +return snprintf (page,PAGE_SIZE ,"deactivated\n" ); } static ssize_t target_stat_tgt_non_access_lus_show(struct config_item *item,
Signature · 1 line
2.43.0
gentle ping...
Best Regards,
Guixin Liu
Quoted 24 lines · Guixin Liu
To ensure the output is not tangled with the shell prompt, add a line break to clearly display the status.
Signed-off-by Guixin Liu <[email protected]>--- drivers/target/target_core_stat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/target/target_core_stat.c +2
-2@@ -117,9 +117,9 @@ static ssize_t target_stat_tgt_status_show(struct config_item *item, char *page) {if (to_stat_tgt_dev (item)->export_count) -return snprintf (page,PAGE_SIZE ,"activated" ); +return snprintf (page,PAGE_SIZE ,"activated\n" );else -return snprintf (page,PAGE_SIZE ,"deactivated" ); +return snprintf (page,PAGE_SIZE ,"deactivated\n" ); } static ssize_t target_stat_tgt_non_access_lus_show(struct config_item *item,
Quoted 14 lines · Guixin Liu
To ensure the output is not tangled with the shell prompt, add a line break to clearly display the status.
Signed-off-by Guixin Liu <[email protected]>--- drivers/target/target_core_stat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/target/target_core_stat.c +0
-0@@ -117,9 +117,9 @@ static ssize_t target_stat_tgt_status_show(struct config_item *item, char *page)
drivers/target/target_core_stat.c static ssize_t target_stat_tgt_status_show(struct config_item *item, · line 125
Quoted 10 lines
drivers/target/target_core_stat.c +2
-2{if (to_stat_tgt_dev (item)->export_count) -return snprintf (page,PAGE_SIZE ,"activated" ); +return snprintf (page,PAGE_SIZE ,"activated\n" );else -return snprintf (page,PAGE_SIZE ,"deactivated" ); +return snprintf (page,PAGE_SIZE ,"deactivated\n" ); } static ssize_t target_stat_tgt_non_access_lus_show(struct config_item *item,
Since all the other files have newlines, this will most likely be ok. targetcli/rtslib work fine.
Martin K. Petersen
AppliedGuixin,
Quoted 2 lines
To ensure the output is not tangled with the shell prompt, add a line break to clearly display the status.
Applied to 6.14/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 4 lines · Guixin Liu
To ensure the output is not tangled with the shell prompt, add a line break to clearly display the status.
Applied to 6.14/scsi-fixes, thanks!
[1/1] scsi: target: core: add line break to status show
https://git.kernel.org/mkp/scsi/c/c9d2782988df
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering