From: Ian Campbell <Ian.Campbell@citrix.com>
To: Julien Grall <julien.grall@linaro.org>
Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org
Subject: Re: [PATCH 4/4] dt-uart: support /chosen/stdout-path property.
Date: Wed, 7 Jan 2015 16:47:11 +0000 [thread overview]
Message-ID: <1420649231.18631.123.camel@citrix.com> (raw)
In-Reply-To: <54AD61F5.2080205@linaro.org>
On Wed, 2015-01-07 at 16:42 +0000, Julien Grall wrote:
> > +
> > + if ( chosen )
> > + {
> > + ret = dt_property_read_string(chosen, "stdout-path", &stdout);
> > + if ( ret >= 0 )
> > + {
> > + printk("Taking dtuart configuration from /chosen/stdout-path\n");
> > + strlcpy(opt_dtuart, stdout, sizeof(opt_dtuart));
>
> The final string in opt_dtuart may be truncated if stdout is bigger than
> 255 characters.
>
> I would add a check to avoid hours of debugging later.
Good point. I suppose it may as well warn and continue: hypothetically
the truncation might only affect some non-critical options so the
console might actually work, so we might as well try.
Ian.
next prev parent reply other threads:[~2015-01-07 16:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-07 15:31 [PATCH 0/4] dt-uart: cleanups, bugfixes and /chosen/stdout-path support Ian Campbell
2015-01-07 15:31 ` [PATCH 1/4] dt-uart: add an emacs magic block Ian Campbell
2015-01-07 16:15 ` Julien Grall
2015-01-07 15:31 ` [PATCH 2/4] dt-uart: Clarify log messages at init time Ian Campbell
2015-01-07 16:17 ` Julien Grall
2015-01-07 15:31 ` [PATCH 3/4] dt-uart: use ':' as default separator between path and options Ian Campbell
2015-01-07 16:31 ` Julien Grall
2015-01-07 16:36 ` Ian Campbell
2015-01-07 15:31 ` [PATCH 4/4] dt-uart: support /chosen/stdout-path property Ian Campbell
2015-01-07 16:42 ` Julien Grall
2015-01-07 16:47 ` Ian Campbell [this message]
2015-01-07 17:04 ` Julien Grall
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=1420649231.18631.123.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=julien.grall@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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.