From: David Disseldorp <ddiss@suse.de>
To: target-devel@vger.kernel.org
Subject: Re: [PATCH v3 3/4] target: add device vendor_id configfs attribute
Date: Wed, 28 Nov 2018 16:28:55 +0000 [thread overview]
Message-ID: <20181128172855.2dfdd7d1@suse.de> (raw)
In-Reply-To: <20181119210636.22979-4-ddiss@suse.de>
On Wed, 28 Nov 2018 08:08:30 -0800, Bart Van Assche wrote:
> > Just a follow up here. I think it's safer to retain strncpy() in this
> > function for the purpose of zero filling. scsi_dump_inquiry() and
> > target_stat_lu_vend_show() walk the entire length of the t10_wwn.vendor
> > buffer.
>
> How about adding a comment about above struct t10_wwn that vendor[], model[]
> and revision[] in that structure may but do not have to be terminated with a
> trailing '\0' and also that unit_serial[] is '\0'-terminated?
>
> It would make me happy if the size of the character arrays in that structure
> would be increased by one and if the target code would be modified such that
> these strings are always '\0'-terminated.
I'm working on the +1 length increase for those t10_wwn members ATM, but
just thought I'd mention that the zeroing of unused bytes is still
required due to the scsi_dump_inquiry() + target_stat_lu_vend_show()
behaviour.
Cheers, David
next prev parent reply other threads:[~2018-11-28 16:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-19 21:06 [PATCH v3 3/4] target: add device vendor_id configfs attribute David Disseldorp
2018-11-20 17:24 ` Bart Van Assche
2018-11-20 18:00 ` David Disseldorp
2018-11-20 18:03 ` Bart Van Assche
2018-11-28 15:37 ` David Disseldorp
2018-11-28 16:08 ` Bart Van Assche
2018-11-28 16:28 ` David Disseldorp [this message]
2018-11-28 16:36 ` Bart Van Assche
2018-11-28 16:44 ` David Disseldorp
2018-11-28 16:47 ` Bart Van Assche
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=20181128172855.2dfdd7d1@suse.de \
--to=ddiss@suse.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.