summaryrefslogtreecommitdiff
path: root/src/ostree/ot-main.h
diff options
context:
space:
mode:
authorDan Nicholson <dbn@endlessos.org>2022-08-30 08:38:36 -0600
committerDan Nicholson <dbn@endlessos.org>2022-08-30 08:46:26 -0600
commite30a3b6b17c89f55c33e7985d11ccae7eb173507 (patch)
tree8426a6110422f9a95aa8e2dbde4d5af4788e7f3e /src/ostree/ot-main.h
parent93a6d7bea2bbbdd61053c99af3a7a2276fdaa234 (diff)
downloadostree-e30a3b6b17c89f55c33e7985d11ccae7eb173507.tar.gz
main: Factor out sysroot loading
It can be useful to parse the options and initialize the sysroot without actually loading it until later. Factor out the sysroot loading to a new `ostree_admin_sysroot_load` and add a new `OSTREE_ADMIN_BUILTIN_FLAG_NO_LOAD` flag to accommodate this.
Diffstat (limited to 'src/ostree/ot-main.h')
-rw-r--r--src/ostree/ot-main.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ostree/ot-main.h b/src/ostree/ot-main.h
index b369deb8..e296501a 100644
--- a/src/ostree/ot-main.h
+++ b/src/ostree/ot-main.h
@@ -36,6 +36,7 @@ typedef enum {
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER = (1 << 0),
OSTREE_ADMIN_BUILTIN_FLAG_UNLOCKED = (1 << 1),
OSTREE_ADMIN_BUILTIN_FLAG_NO_SYSROOT = (1 << 2),
+ OSTREE_ADMIN_BUILTIN_FLAG_NO_LOAD = (1 << 3),
} OstreeAdminBuiltinFlags;
@@ -91,6 +92,11 @@ gboolean ostree_admin_option_context_parse (GOptionContext *context,
OstreeSysroot **out_sysroot,
GCancellable *cancellable, GError **error);
+gboolean ostree_admin_sysroot_load (OstreeSysroot *sysroot,
+ OstreeAdminBuiltinFlags flags,
+ GCancellable *cancellable,
+ GError **error);
+
gboolean ostree_ensure_repo_writable (OstreeRepo *repo, GError **error);
void ostree_print_gpg_verify_result (OstreeGpgVerifyResult *result);