imgtool: Output format option to dumpinfo#2622
Conversation
|
@fundakol please review |
|
@5frank please see failing CI |
|
Usage of dumpinfo is now very confusing.
|
d183967 to
0d8752f
Compare
|
@fundakol Tanks for the feedback! |
|
Sorry for fragmented PR. I added |
|
@5frank see failing CI |
a05b7ab to
226c947
Compare
|
@5frank see failing CI |
Add -f, --format option to support multiple output formats (human, yaml, json). Default yaml for file, default human for stdout - backward compatible. Details: - Human output is unchanged - Refactored dump_imginfo() to separate data reading from formatting - JSON output uses hex strings for binary data (e.g., "e3a333ca...") - YAML and JSON have both "type" (int) and "type_name" (str) for TLVs - Image filename (basename) is included in all output formats - Argument `--silent` is silently ignored. Doesn't make sense for a command that outputs data. i.e. No output on success. This is the same as for other sub commands Signed-off-by: Simon Frank <simon.frank@lohmega.com>
226c947 to
0510820
Compare
fundakol
left a comment
There was a problem hiding this comment.
It looks good. I could make a few comments about code formatting, but since we don't have any rules defined for this repository, I don't want to block this PR.
Add -f, --format option to support multiple output formats (human, yaml,
json). Default yaml for file, default human for stdout - backward
compatible.
Details:
--silentis silently ignored. Doesn't make sense for acommand that outputs data. i.e. No output on success. This is the same
as for other sub commands