SCSI target development
 help / color / mirror / Atom feed
From: Mike Christie <mchristi@redhat.com>
To: target-devel@vger.kernel.org
Subject: Re: [PATCH] target:tcmu:add '\n' when return user space
Date: Mon, 11 Mar 2019 16:05:04 +0000	[thread overview]
Message-ID: <5C868730.1070503@redhat.com> (raw)

On 03/10/2019 09:41 AM, David Disseldorp wrote:
> Hi,
> 
> On Sun, 10 Mar 2019 22:07:53 +0800, tangwenji wrote:
> 
>> In function tcmu_get_global_max_data_area return string should include '\n'.
> 
> Why? Please describe the motivation for your changes.
> 
>> Signed-off-by: tangwenji <tang.wenji@zte.com.cn>
>> ---
>>  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 5831e0e..50229c1 100644
>> --- a/drivers/target/target_core_user.c
>> +++ b/drivers/target/target_core_user.c
>> @@ -244,7 +244,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));
> 
> Although minor, this is still a modification to a released API so
> probably can't be done without potentially breaking user-space.
> 

I think the lack of newline is breaking some tools, because they were
looking for newlines due to the other files having it.

             reply	other threads:[~2019-03-11 16:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 16:05 Mike Christie [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-03-11 16:48 [PATCH] target:tcmu:add '\n' when return user space David Disseldorp
2019-03-11 16:15 Mike Christie
2019-03-11 16:03 Mike Christie
2019-03-10 14:41 David Disseldorp
2019-03-10 14:07 tangwenji

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=5C868730.1070503@redhat.com \
    --to=mchristi@redhat.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