Skip to content

Commit

Permalink
fdtdump: Discourage use of fdtdump
Browse files Browse the repository at this point in the history
fdtdump is, and always has been, a quick-and-dirty debugging tool.  However
I keep getting reports of people using it for real work.  For production
decompiling of a dtb, dtc in -I dtb -O dts mode is the right tool. In the
hopes of getting that message out there, add a warning message to fdtdump
to discourage its use.

Signed-off-by: David Gibson <[email protected]>
  • Loading branch information
dgibson committed Apr 18, 2017
1 parent c225884 commit 548aea2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fdtdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ int main(int argc, char *argv[])
bool scan = false;
off_t len;

fprintf(stderr, "\n"
"**** fdtdump is a low-level debugging tool, not meant for general use.\n"
"**** If you want to decompile a dtb, you probably want\n"
"**** dtc -I dtb -O dts <filename>\n\n"
);
while ((opt = util_getopt_long()) != EOF) {
switch (opt) {
case_USAGE_COMMON_FLAGS
Expand Down

0 comments on commit 548aea2

Please sign in to comment.