aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/dtc/fdt.cc
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2019-10-26 17:10:27 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2019-10-26 17:10:27 +0000
commitc571e05c2caf6c8c5366805eaf0b682fba480322 (patch)
tree9b47eacc6dd9e3d00ddd69e70db8f100307a6c94 /usr.bin/dtc/fdt.cc
parent499fe48de8938d4c7b0a91e20eb6c16db9d55633 (diff)
downloadsrc-c571e05c2caf6c8c5366805eaf0b682fba480322.tar.gz
src-c571e05c2caf6c8c5366805eaf0b682fba480322.zip
dtc: Allow multiple dts-v1 tag
Some dts are including dtsi that also contain a /dts-v1/ tag at the top. GNU DTC doesn't seems to have a problem with that so fix our dtc to behave the same. Reviewed by: kevans MFC after: 1 week
Notes
Notes: svn path=/head/; revision=354115
Diffstat (limited to 'usr.bin/dtc/fdt.cc')
-rw-r--r--usr.bin/dtc/fdt.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/dtc/fdt.cc b/usr.bin/dtc/fdt.cc
index a1e2fc4dbf2d..606493e3521b 100644
--- a/usr.bin/dtc/fdt.cc
+++ b/usr.bin/dtc/fdt.cc
@@ -1563,11 +1563,11 @@ device_tree::parse_file(text_input_buffer &input,
{
input.next_token();
// Read the header
- if (input.consume("/dts-v1/;"))
+ while (input.consume("/dts-v1/;"))
{
read_header = true;
+ input.next_token();
}
- input.next_token();
if (input.consume("/plugin/;"))
{
is_plugin = true;