summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--futility/updater_archive.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/futility/updater_archive.c b/futility/updater_archive.c
index 70d8bb33..f2475b6a 100644
--- a/futility/updater_archive.c
+++ b/futility/updater_archive.c
@@ -1061,16 +1061,16 @@ static void print_json_image(
return;
if (load_firmware_image(&image, fpath, archive))
return;
- if (is_host)
- gbb = find_gbb(&image);
- else
+ if (!is_host)
printf(",\n");
printf("%*s\"%s\": { \"versions\": { \"ro\": \"%s\", \"rw\": \"%s\" },",
indent, "", name, image.ro_version, image.rw_version_a);
indent += 2;
- if (is_host && patch_image_by_model(&image, m, archive) != 0) {
+ if (!is_host) {
+ /* No extra information to be printed */
+ } else if (patch_image_by_model(&image, m, archive) != 0) {
ERROR("Failed to patch images by model: %s\n", m->name);
- } else if (gbb) {
+ } else if (NULL != (gbb = find_gbb(&image))) {
printf("\n%*s\"keys\": { \"root\": \"%s\", ",
indent, "",
get_gbb_key_hash(gbb, gbb->rootkey_offset,