Skip to content

Commit

Permalink
Merge pull request #1239 from ejoerns/user-friendly-activated
Browse files Browse the repository at this point in the history
src/main: more user-friendly output when no slot is activated
  • Loading branch information
ejoerns committed Aug 29, 2023
2 parents c66bca2 + a361607 commit 59d9e04
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,10 @@ static gchar* r_status_formatter_readable(RaucStatusPrint *status)
g_string_append_printf(text, "Booted from: %s (%s)\n\n", bootedfrom ? bootedfrom->name : NULL, status->bootslot);

g_string_append(text, "=== Bootloader ===\n");
g_string_append_printf(text, "Activated: %s (%s)\n\n", status->primary ? status->primary->name : NULL, status->primary ? status->primary->bootname : NULL);
if (!status->primary)
g_string_append_printf(text, "Activated: none\n\n");
else
g_string_append_printf(text, "Activated: %s (%s)\n\n", status->primary->name, status->primary->bootname);

g_string_append(text, "=== Slot States ===\n");
slotclasses = r_slot_get_root_classes(status->slots);
Expand Down

0 comments on commit 59d9e04

Please sign in to comment.