sysroot: Clean up API

Now that we have a real GObject for the sysroot, we have a convenient
place to keep track of 4 pieces of state:

* The current deployment list
* The current bootversion
* The current subbootversion
* The current booted deployment (if any)

Avoid requiring callers to pass all of this around and load it
piecemeal; instead the new thing is ostree_sysroot_load().
This commit is contained in:
Colin Walters committed 2013-09-16 18:32:13 -04:00
1 parent c07c84cb6f
commit 8f1ea1b50a
14 files changed
+361 -356

No files matched your search

+14
View File
@@ -30,6 +30,13 @@ struct OstreeSysroot {
GFile *path;
int sysroot_fd;
gboolean loaded;
GPtrArray *deployments;
int bootversion;
int subbootversion;
OstreeDeployment *booted_deployment;
};
gboolean
@@ -39,6 +46,13 @@ _ostree_sysroot_read_boot_loader_configs (OstreeSysroot *self,
GCancellable *cancellable,
GError **error);
gboolean
_ostree_sysroot_read_current_subbootversion (OstreeSysroot *self,
int bootversion,
int *out_subbootversion,
GCancellable *cancellable,
GError **error);
gboolean
_ostree_sysroot_parse_deploy_path_name (const char *name,
char **out_csum,