All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@suse.de>
To: target-devel@vger.kernel.org
Subject: Re: [PATCH v6 3/5] target: add device vendor_id configfs attribute
Date: Tue, 04 Dec 2018 14:58:45 +0000	[thread overview]
Message-ID: <20181204155845.042c19f1@suse.de> (raw)
In-Reply-To: <20181204101238.20587-4-ddiss@suse.de>

On Tue, 4 Dec 2018 15:13:51 +0300, Roman Bolshakov wrote:

> > +	/* Assume ASCII encoding. Strip any newline added from userspace. */
> > +	BUILD_BUG_ON(sizeof(dev->t10_wwn.vendor) != INQUIRY_VENDOR_LEN + 1);
> > +	strlcpy(dev->t10_wwn.vendor, strstrip(buf),
> > +		sizeof(dev->t10_wwn.vendor));
> > +  
> 
> Should we allow non-ASCII characters?

No :)

> It's okay to strip final newline
> for convenience. A simple loop would ensure the rest is conformant to
> SPC. EINVAL can be returned otherwise.

I'll add an isascii() loop in the next round.

Cheers, David

  parent reply	other threads:[~2018-12-04 14:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-04 10:12 [PATCH v6 3/5] target: add device vendor_id configfs attribute David Disseldorp
2018-12-04 12:13 ` Roman Bolshakov
2018-12-04 13:26 ` Roman Bolshakov
2018-12-04 14:31 ` David Disseldorp
2018-12-04 14:58 ` David Disseldorp [this message]
2018-12-04 15:48 ` 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=20181204155845.042c19f1@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.