cmd: fix 'fdt get value'

The 32bit cells of a device-tree property are big-endian. When printing
them via 0x08x we must first convert to the host endianness.

Remove the restriction to 20 bytes length. This would not allow to read an
SHA256 value.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
Heinrich Schuchardt
2025-11-23 23:57:10 +01:00
committed by Tom Rini
parent c2ee1e3c4a
commit 21fbda84b3
2 changed files with 16 additions and 12 deletions

View File

@@ -494,7 +494,7 @@ static int fdt_test_get_value_common(struct unit_test_state *uts,
* longer is an error. This is a special case for handling hashes.
*/
ut_assertok(fdt_test_get_value_string(uts, node, "regs", NULL,
"3412000000100000", 0));
"0000123400001000", 0));
/* Test getting 0th element of $node node regs property */
ut_assertok(fdt_test_get_value_string(uts, node, "regs", "0", NULL,