Re: [PATCH v7 2/5] target: consistently null-terminate t10_wwn strings

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

 



On Wed, Dec 05, 2018 at 01:18:35PM +0100, David Disseldorp wrote:
> In preparation for supporting user provided vendor strings, add an extra
> byte to the vendor, model and revision arrays in struct t10_wwn. This
> ensures that the full INQUIRY data can be carried in the arrays along
> with a null-terminator.
> 
> Change a number of array readers and writers so that they account for
> explicit null-termination:
> - The pscsi_set_inquiry_info() and emulate_model_alias_store() codepaths
>   don't currently explicitly null-terminate; fix this.
> - Existing t10_wwn field dumps use for-loops which step over
>   null-terminators for right-padding.
>   + Use printf with width specifiers instead.
> 
> Signed-off-by: David Disseldorp <ddiss@xxxxxxx>
> ---
>  drivers/target/target_core_configfs.c | 16 +++++++----
>  drivers/target/target_core_device.c   | 46 ++++++++++----------------------
>  drivers/target/target_core_pscsi.c    | 50 +++++++++++------------------------
>  drivers/target/target_core_spc.c      |  7 ++---
>  drivers/target/target_core_stat.c     | 32 +++++-----------------
>  include/target/target_core_base.h     | 14 +++++++---
>  6 files changed, 63 insertions(+), 102 deletions(-)
> 

Reviewed-by: Roman Bolshakov <r.bolshakov@xxxxxxxxx>

Thank you,
Roman Bolshakov



[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