From: Mike Christie <michael.christie@oracle.com>
To: Guixin Liu <kanie@linux.alibaba.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org
Subject: Re: [PATCH] scsi: target: core: add line break to status show
Date: Fri, 17 Jan 2025 13:43:29 -0600 [thread overview]
Message-ID: <cb0c1937-8b33-4bc5-8f33-afbd9b3264b2@oracle.com> (raw)
In-Reply-To: <20250114025041.97301-1-kanie@linux.alibaba.com>
On 1/13/25 8:50 PM, Guixin Liu wrote:
> 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 <kanie@linux.alibaba.com>
> ---
> drivers/target/target_core_stat.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/target/target_core_stat.c b/drivers/target/target_core_stat.c
> index c42cbde8a31b..210648a0092e 100644
> --- a/drivers/target/target_core_stat.c
> +++ b/drivers/target/target_core_stat.c
> @@ -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,
Since all the other files have newlines, this will most likely be ok.
targetcli/rtslib work fine.
Reviewed-by: Mike Christie <michael.christie@oracle.com>
next prev parent reply other threads:[~2025-01-17 19:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 2:50 [PATCH] scsi: target: core: add line break to status show Guixin Liu
2025-01-17 5:57 ` Guixin Liu
2025-01-17 19:43 ` Mike Christie [this message]
2025-01-21 17:19 ` Martin K. Petersen
2025-02-04 3:35 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cb0c1937-8b33-4bc5-8f33-afbd9b3264b2@oracle.com \
--to=michael.christie@oracle.com \
--cc=kanie@linux.alibaba.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox