Skip to content

Commit c53fe0b

Browse files
committed
src/context: priorize bootchooser to select bootslot
The commit 9af0613 introduced the new bootchooser API r_boot_get_current_bootname() to allow the backend to determine the current bootslot. Since then, the bootchooser is able determine the bootslot if it cannot be guessed from the kernel cmdline; it is used by the custom backend only at that moment. This gives the priority to the bootchooser over the kernel cmdline. Signed-off-by: Gaël PORTAY <[email protected]>
1 parent fa1dc1f commit c53fe0b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/context.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,6 @@ static gboolean r_context_configure_target(GError **error)
373373
if (r_whitespace_removed(context->config->system_variant))
374374
g_warning("Ignoring surrounding whitespace in system variant: %s", context->config->system_variant);
375375

376-
if (context->bootslot == NULL) {
377-
context->bootslot = get_cmdline_bootname();
378-
}
379-
380376
if (context->bootslot == NULL) {
381377
context->bootslot = r_boot_get_current_bootname(context->config, &ierror);
382378
if (ierror) {
@@ -385,6 +381,10 @@ static gboolean r_context_configure_target(GError **error)
385381
}
386382
}
387383

384+
if (context->bootslot == NULL) {
385+
context->bootslot = get_cmdline_bootname();
386+
}
387+
388388
g_clear_pointer(&context->boot_id, g_free);
389389
g_clear_pointer(&context->machine_id, g_free);
390390

0 commit comments

Comments
 (0)