sysroot: Look for booted deployment correctly
We need to look at the list we just gathered, not potentially NULL.
This commit is contained in:
parent
8f1ea1b50a
commit
0818a462c2
|
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
find_booted_deployment (OstreeSysroot *self,
|
find_booted_deployment (OstreeSysroot *self,
|
||||||
|
GPtrArray *deployments,
|
||||||
OstreeDeployment **out_deployment,
|
OstreeDeployment **out_deployment,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
@ -717,7 +718,7 @@ ostree_sysroot_load (OstreeSysroot *self,
|
||||||
ostree_deployment_set_index (deployment, i);
|
ostree_deployment_set_index (deployment, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!find_booted_deployment (self, &self->booted_deployment,
|
if (!find_booted_deployment (self, deployments, &self->booted_deployment,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
|
@ -903,6 +904,7 @@ parse_kernel_commandline (OstreeOrderedHash **out_args,
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
find_booted_deployment (OstreeSysroot *self,
|
find_booted_deployment (OstreeSysroot *self,
|
||||||
|
GPtrArray *deployments,
|
||||||
OstreeDeployment **out_deployment,
|
OstreeDeployment **out_deployment,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
|
|
@ -930,9 +932,9 @@ find_booted_deployment (OstreeSysroot *self,
|
||||||
bootlink_arg = g_hash_table_lookup (kernel_args->table, "ostree");
|
bootlink_arg = g_hash_table_lookup (kernel_args->table, "ostree");
|
||||||
if (bootlink_arg)
|
if (bootlink_arg)
|
||||||
{
|
{
|
||||||
for (i = 0; i < self->deployments->len; i++)
|
for (i = 0; i < deployments->len; i++)
|
||||||
{
|
{
|
||||||
OstreeDeployment *deployment = self->deployments->pdata[i];
|
OstreeDeployment *deployment = deployments->pdata[i];
|
||||||
gs_unref_object GFile *deployment_path = ostree_sysroot_get_deployment_directory (active_deployment_root, deployment);
|
gs_unref_object GFile *deployment_path = ostree_sysroot_get_deployment_directory (active_deployment_root, deployment);
|
||||||
guint32 device;
|
guint32 device;
|
||||||
guint64 inode;
|
guint64 inode;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue