[ostree] sysroot: Look for booted deployment correctly
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] sysroot: Look for booted deployment correctly
- Date: Tue, 17 Sep 2013 14:54:34 +0000 (UTC)
commit 0818a462c26babc5b7d5656180c5ad9a8eb04a9e
Author: Colin Walters <walters verbum org>
Date: Tue Sep 17 10:53:41 2013 -0400
sysroot: Look for booted deployment correctly
We need to look at the list we just gathered, not potentially NULL.
src/libostree/ostree-sysroot.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c
index 01d1617..e5851ad 100644
--- a/src/libostree/ostree-sysroot.c
+++ b/src/libostree/ostree-sysroot.c
@@ -29,6 +29,7 @@
static gboolean
find_booted_deployment (OstreeSysroot *self,
+ GPtrArray *deployments,
OstreeDeployment **out_deployment,
GCancellable *cancellable,
GError **error);
@@ -717,7 +718,7 @@ ostree_sysroot_load (OstreeSysroot *self,
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))
goto out;
@@ -903,6 +904,7 @@ parse_kernel_commandline (OstreeOrderedHash **out_args,
static gboolean
find_booted_deployment (OstreeSysroot *self,
+ GPtrArray *deployments,
OstreeDeployment **out_deployment,
GCancellable *cancellable,
GError **error)
@@ -930,9 +932,9 @@ find_booted_deployment (OstreeSysroot *self,
bootlink_arg = g_hash_table_lookup (kernel_args->table, "ostree");
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);
guint32 device;
guint64 inode;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]