diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-08-25 10:41:39 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-08-25 10:41:39 +0000 |
commit | cb1a9826d71d9da57c82143861720a7f0f920072 (patch) | |
tree | 0080503c855e84c86890d371db901ea4aadfb0fd /sys/arch/arm64/stand | |
parent | d52dbe7a7d3b59a69d51863d434efea9eac94c96 (diff) |
Insert new child nodes at the end.
ok patrick@
Diffstat (limited to 'sys/arch/arm64/stand')
-rw-r--r-- | sys/arch/arm64/stand/efiboot/fdt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/arm64/stand/efiboot/fdt.c b/sys/arch/arm64/stand/efiboot/fdt.c index 4927247cbc1..7f9f0a2f2bd 100644 --- a/sys/arch/arm64/stand/efiboot/fdt.c +++ b/sys/arch/arm64/stand/efiboot/fdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fdt.c,v 1.3 2017/08/23 18:03:54 kettenis Exp $ */ +/* $OpenBSD: fdt.c,v 1.4 2018/08/25 10:41:38 kettenis Exp $ */ /* * Copyright (c) 2009 Dariusz Swiderski <sfires@sfires.net> @@ -309,6 +309,10 @@ fdt_node_add_node(void *node, char *name, void **child) ptr = skip_node_name(ptr + 1); ptr = skip_props(ptr); + /* skip children */ + while (betoh32(*ptr) == FDT_NODE_BEGIN) + ptr = skip_node(ptr); + memmove((char *)ptr + len, ptr, tree.end - (char *)ptr); tree.struct_size += len; if (tree.strings > tree.tree) |