From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"emilne@redhat.com" <emilne@redhat.com>
Subject: Re: [PATCH] sd: fix sysfs writes to "provisioning_mode" and "zeroing_mode"
Date: Mon, 15 May 2017 20:14:50 +0000 [thread overview]
Message-ID: <1494879289.2567.3.camel@sandisk.com> (raw)
In-Reply-To: <1494875606-6298-1-git-send-email-emilne@redhat.com>
On Mon, 2017-05-15 at 15:13 -0400, Ewan D. Milne wrote:
> From: "Ewan D. Milne" <emilne@redhat.com>
>
> Change to use strlen() of the desired string for the length
> parameter to strncmp(). Otherwise one cannot simply use a
> command like 'echo "writesame_16" > .../provisioning_mode'.
> This patch makes sysfs writes consistent with other usage.
Hello Ewan,
Sorry but I don't like the approach of this patch. Have you considered
to strip the whitespace from 'buf' with e.g. strim() such that strcmp()
can be used instead of strncmp(buf, ..., strlen(...))?
Thanks,
Bart.
next prev parent reply other threads:[~2017-05-15 20:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-15 19:13 [PATCH] sd: fix sysfs writes to "provisioning_mode" and "zeroing_mode" Ewan D. Milne
2017-05-15 20:14 ` Bart Van Assche [this message]
2017-05-15 21:02 ` Ewan D. Milne
2017-05-15 21:14 ` Bart Van Assche
2017-05-15 21:18 ` Martin K. Petersen
2017-05-16 12:52 ` Ewan D. Milne
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=1494879289.2567.3.camel@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=emilne@redhat.com \
--cc=linux-scsi@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