Re: [PATCH] sd: fix sysfs writes to "provisioning_mode" and "zeroing_mode"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2017-05-15 at 15:13 -0400, Ewan D. Milne wrote:
> From: "Ewan D. Milne" <emilne@xxxxxxxxxx>
> 
> 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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux