Re: [PATCH] target/stat: print full t10_wwn.model buffer

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

 



On Fri, 2015-11-27 at 18:37 +0100, David Disseldorp wrote:
> Cut 'n paste error saw it only process sizeof(t10_wwn.vendor) characters.
> 
> Signed-off-by: David Disseldorp <ddiss@xxxxxxx>
> ---
>  drivers/target/target_core_stat.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Resend: Split fix out from T10 vendor modification patchset.
> 
> diff --git a/drivers/target/target_core_stat.c b/drivers/target/target_core_stat.c
> index 273c72b..81a6b3e 100644
> --- a/drivers/target/target_core_stat.c
> +++ b/drivers/target/target_core_stat.c
> @@ -246,7 +246,7 @@ static ssize_t target_stat_lu_prod_show(struct config_item *item, char *page)
>  	char str[sizeof(dev->t10_wwn.model)+1];
>  
>  	/* scsiLuProductId */
> -	for (i = 0; i < sizeof(dev->t10_wwn.vendor); i++)
> +	for (i = 0; i < sizeof(dev->t10_wwn.model); i++)
>  		str[i] = ISPRINT(dev->t10_wwn.model[i]) ?
>  			dev->t10_wwn.model[i] : ' ';
>  	str[i] = '\0';

Looks reasonable.  Applied to target-pending/master.

Thanks David.

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux