return TRUE;
}
+/* For a given bootversion, get its subbootversion from `/ostree/boot.$bootversion`. */
gboolean
_ostree_sysroot_read_current_subbootversion (OstreeSysroot *self,
int bootversion,
return FALSE;
if (errno == ENOENT)
{
+ g_debug ("Didn't find $sysroot/ostree/boot.%d symlink; assuming subbootversion 0", bootversion);
*out_subbootversion = 0;
}
else
return compare_boot_loader_configs (a, b);
}
+/* Read all the bootconfigs from `/boot/loader/`. */
gboolean
_ostree_sysroot_read_boot_loader_configs (OstreeSysroot *self,
int bootversion,
return TRUE;
}
+/* Get the bootversion from the `/boot/loader` symlink. */
static gboolean
read_current_bootversion (OstreeSysroot *self,
int *out_bootversion,
return FALSE;
if (errno == ENOENT)
{
+ g_debug ("Didn't find $sysroot/boot/loader symlink; assuming bootversion 0");
ret_bootversion = 0;
}
else
return FALSE;
g_autofree char *errprefix =
- g_strdup_printf ("Parsing deployment %i in stateroot '%s'", treebootserial, osname);
+ g_strdup_printf ("Parsing deployment %s in stateroot '%s'", boot_link, osname);
GLNX_AUTO_PREFIX_ERROR(errprefix, error);
const char *relative_boot_link = boot_link;
return NULL;
}
+/* From a BLS config, use its ostree= karg to find the deployment it points to and add it to
+ * the inout_deployments array. */
static gboolean
list_deployments_process_one_boot_entry (OstreeSysroot *self,
OstreeBootconfigParser *config,
return TRUE;
}
+/* Loads the current bootversion, subbootversion, and deplyments, starting from the
+ * bootloader configs which are the source of truth.
+ */
static gboolean
sysroot_load_from_bootloader_configs (OstreeSysroot *self,
GCancellable *cancellable,