diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2018-08-17 13:24:48 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2018-08-17 13:24:48 +0000 |
commit | 1a36f105a4b129eea99cd70b356c69677fb9bbc3 (patch) | |
tree | f3155df0a4a77043302090fea07bb5c4a429f5ef /usr.bin/dtc/dtb.cc | |
parent | 9fbb0faf4fb0dbecffd32caffebc0229e37fc720 (diff) | |
download | src-1a36f105a4b129eea99cd70b356c69677fb9bbc3.tar.gz src-1a36f105a4b129eea99cd70b356c69677fb9bbc3.zip |
dtc(1): Update to 97d2d5715eeb45108cc60367fdf6bd5b2046b050
Notable fixes:
- Overlays may now be generated properly without -@
- /__local_fixups__ were not including unit address in their structure
- The error reporting a magic token was misleading, reporting
"Bad magic token in header. Got d00dfeed expected 0xd00dfeed"
if the token was missing. This has been split out into a separate message.
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=337964
Diffstat (limited to 'usr.bin/dtc/dtb.cc')
-rw-r--r-- | usr.bin/dtc/dtb.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/dtc/dtb.cc b/usr.bin/dtc/dtb.cc index 6594774df657..5808e16ec75e 100644 --- a/usr.bin/dtc/dtb.cc +++ b/usr.bin/dtc/dtb.cc @@ -262,9 +262,14 @@ header::write(output_writer &out) bool header::read_dtb(input_buffer &input) { - if (!(input.consume_binary(magic) && magic == 0xd00dfeed)) + if (!input.consume_binary(magic)) { - fprintf(stderr, "Missing magic token in header. Got %" PRIx32 + fprintf(stderr, "Missing magic token in header."); + return false; + } + if (magic != 0xd00dfeed) + { + fprintf(stderr, "Bad magic token in header. Got %" PRIx32 " expected 0xd00dfeed\n", magic); return false; } |