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 v4 5/7] target: add device vendor_id configfs attribute
Date: Thu, 29 Nov 2018 21:33:19 +0000	[thread overview]
Message-ID: <20181129223319.139a2693@suse.de> (raw)
In-Reply-To: <20181129010157.12687-6-ddiss@suse.de>

On Thu, 29 Nov 2018 08:32:47 -0800, Bart Van Assche wrote:

> > +	unsigned char buf[INQUIRY_VENDOR_LEN + 1];
> > +
> > +	if (strlen(page) > INQUIRY_VENDOR_LEN) {
> > +		pr_err("Emulated T10 Vendor Identification exceeds"
> > +			" INQUIRY_VENDOR_LEN: " __stringify(INQUIRY_VENDOR_LEN)
> > +			"\n");
> > +		return -EOVERFLOW;
> > +	}  
> 
> Does this force users to use "echo -n" to configure vendor IDs that are
> INQUIRY_VENDOR_LEN bytes long?

It does. As mentioned in v3, this follows the convention used in
target_wwn_vpd_unit_serial_store(). I don't feel too strongly about it,
but it does make buf allocation a little less error prone IMO.

Cheers, David

      parent reply	other threads:[~2018-11-29 21:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29  1:01 [PATCH v4 5/7] target: add device vendor_id configfs attribute David Disseldorp
2018-11-29  1:14 ` Ly, Bryant
2018-11-29  1:29 ` Lee Duncan
2018-11-29 16:32 ` Bart Van Assche
2018-11-29 21:33 ` David Disseldorp [this message]

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=20181129223319.139a2693@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.