Return error on inner decode failure instead of hanging, split flash-status output
This commit is contained in:
@@ -224,15 +224,10 @@ func cmdFlashStatus(args []string) error {
|
||||
slog.Error("flash-status error", "via", t.name, "err", err)
|
||||
continue
|
||||
}
|
||||
slog.Info("flash-status",
|
||||
"via", t.name,
|
||||
"boot_partition", status.BootPartition,
|
||||
"slot_a_valid", status.SlotA.Valid,
|
||||
"slot_a_version", status.SlotA.Version,
|
||||
"slot_a_hash_ok", status.SlotA.HashOK,
|
||||
"slot_b_valid", status.SlotB.Valid,
|
||||
"slot_b_version", status.SlotB.Version,
|
||||
"slot_b_hash_ok", status.SlotB.HashOK)
|
||||
log := slog.With("via", t.name)
|
||||
log.Info("flash-status", "boot_partition", status.BootPartition)
|
||||
log.Info("slot-a", "valid", status.SlotA.Valid, "version", status.SlotA.Version, "hash_ok", status.SlotA.HashOK)
|
||||
log.Info("slot-b", "valid", status.SlotB.Valid, "version", status.SlotB.Version, "hash_ok", status.SlotB.HashOK)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user