From: Prusov Igor Vladimirovich <Igor.V.Prusov-wnI+JWxWOPs@public.gmane.org>
To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] fdtdump: fix output of bytestring properties
Date: Wed, 08 Jul 2015 19:20:30 +0300 [thread overview]
Message-ID: <559D4DCE.4040000@mcst.ru> (raw)
Currently, when fdtdump prints bytestring property, it prints ffffff
in front of bytes with first bit equal to 1 (0x80 - 0xff)
For example:
property = [80];
will become
property = [ffffff80];
This patch fixes it.
Signed-off-by: Igor Prusov <Igor.V.Prusov-wnI+JWxWOPs@public.gmane.org>
---
util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -up util.c{.orig,}
--- util.c.orig 2015-07-08 16:45:49.374127737 +0300
+++ util.c 2015-07-08 16:45:53.095127906 +0300
@@ -378,7 +378,7 @@ void utilfdt_print_data(const char *data
} else {
printf(" = [");
for (i = 0; i < len; i++)
- printf("%02x%s", *p++, i < len - 1 ? " " : "");
+ printf("%02hhx%s", *p++, i < len - 1 ? " " : "");
printf("]");
}
}
next reply other threads:[~2015-07-08 16:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 16:20 Prusov Igor Vladimirovich [this message]
[not found] ` <559D4DCE.4040000-wnI+JWxWOPs@public.gmane.org>
2015-07-09 3:50 ` [PATCH] fdtdump: fix output of bytestring properties David Gibson
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=559D4DCE.4040000@mcst.ru \
--to=igor.v.prusov-wni+jwxwops@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).