[PATCH] fdtdump: fix output of bytestring properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxx>
---
 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("]");
     }
 }

--
To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux