prepare-root: Handle non-AB aboot properly
authorAlexander Larsson <alexl@redhat.com>
Mon, 15 Apr 2024 18:09:34 +0000 (20:09 +0200)
committerAlexander Larsson <alexl@redhat.com>
Mon, 15 Apr 2024 18:09:34 +0000 (20:09 +0200)
otcore_get_ostree_target() should set is_aboot for android boot
systems, but currently it only does this on A/B boot systems, not
single-boot-partition systems. Fix this by setting it in the second
case.

src/libotcore/otcore-prepare-root.c

index 187eeec09c8fae8e218000c18a6f691f43178ce7..f76db04a336378beffb4cdbe04c24330e67667c7 100644 (file)
@@ -111,6 +111,8 @@ otcore_get_ostree_target (const char *cmdline, gboolean *is_aboot, char **out_ta
    */
   if (proc_cmdline_has_key_starting_with (cmdline, "androidboot."))
     {
+      if (is_aboot)
+        *is_aboot = true;
       *out_target = g_strdup (slot_a);
       return TRUE;
     }