From: Rob Herring <rob.herring@calxeda.com>
To: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Grant Likely <grant.likely@secretlab.ca>,
devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org, Matt Porter <mporter@ti.com>,
Russ Dill <Russ.Dill@ti.com>, Jon Loeliger <jdl@jdl.com>
Subject: Re: [PATCH] dtc: fdtdump, properly handle multi-string properties
Date: Thu, 03 Jan 2013 17:34:36 -0600 [thread overview]
Message-ID: <50E6158C.3050700@calxeda.com> (raw)
In-Reply-To: <1357252332-6131-1-git-send-email-panto@antoniou-consulting.com>
On 01/03/2013 04:32 PM, Pantelis Antoniou wrote:
> Device tree can store multiple strings in a single property.
> We didn't handle that case properly.
>
> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
> ---
> scripts/dtc/fdtdump.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
These need to be posted against the upstream dtc sources and to the dtc
maintainer Jon Loeliger.
Rob
>
> diff --git a/scripts/dtc/fdtdump.c b/scripts/dtc/fdtdump.c
> index 207a46d..d4fa6d7 100644
> --- a/scripts/dtc/fdtdump.c
> +++ b/scripts/dtc/fdtdump.c
> @@ -21,13 +21,23 @@ static void print_data(const char *data, int len)
> {
> int i;
> const char *p = data;
> + const char *s;
>
> /* no data, don't print */
> if (len == 0)
> return;
>
> if (util_is_printable_string(data, len)) {
> - printf(" = \"%s\"", (const char *)data);
> + printf(" = ");
> +
> + s = data;
> + do {
> + printf("\"%s\"", s);
> + s += strlen(s) + 1;
> + if (s < data + len)
> + printf(", ");
> + } while (s < data + len);
> +
> } else if ((len % 4) == 0) {
> printf(" = <");
> for (i = 0; i < len; i += 4)
>
prev parent reply other threads:[~2013-01-03 23:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-03 22:32 [PATCH] dtc: fdtdump, properly handle multi-string properties Pantelis Antoniou
2013-01-03 22:32 ` Pantelis Antoniou
2013-01-03 23:34 ` Rob Herring [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=50E6158C.3050700@calxeda.com \
--to=rob.herring@calxeda.com \
--cc=Russ.Dill@ti.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=jdl@jdl.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mporter@ti.com \
--cc=panto@antoniou-consulting.com \
/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.