[Crosstoolchain-logs] [device-tree-compiler] 66/198: fdtdump: properly handle multi-string properties
Hector Oron
zumbi at moszumanska.debian.org
Thu Dec 8 17:06:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
zumbi pushed a commit to branch upstream/1.4.x
in repository device-tree-compiler.
commit 94a4799b200451d4037ec9219023becfe8c45ef1
Author: Pantelis Antoniou <panto at antoniou-consulting.com>
Date: Fri Jan 4 21:12:46 2013 +0200
fdtdump: properly handle multi-string properties
Device tree can store multiple strings in a single property.
We didn't handle that case properly.
Signed-off-by: Pantelis Antoniou <panto at antoniou-consulting.com>
Acked-by: David Gibson <david at gibson.dropbear.id.au>
---
fdtdump.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/fdtdump.c b/fdtdump.c
index 207a46d..d4fa6d7 100644
--- a/fdtdump.c
+++ b/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)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git
More information about the Crosstoolchain-logs
mailing list