diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c index c48a03c5..94d29ca6 100644 --- a/src/ostree/ot-main.c +++ b/src/ostree/ot-main.c @@ -360,3 +360,17 @@ ostree_admin_option_context_parse (GOptionContext *context, out: return success; } + +gboolean +ostree_ensure_repo_writable (OstreeRepo *repo, + GError **error) +{ + gboolean ret; + + ret = ostree_repo_is_writable (repo, error); + + g_prefix_error (error, "Cannot write to repository: "); + + return ret; +} + diff --git a/src/ostree/ot-main.h b/src/ostree/ot-main.h index 5f31b240..659727f3 100644 --- a/src/ostree/ot-main.h +++ b/src/ostree/ot-main.h @@ -51,3 +51,5 @@ gboolean ostree_admin_option_context_parse (GOptionContext *context, int *argc, char ***argv, OstreeSysroot **out_sysroot, GCancellable *cancellable, GError **error); + +gboolean ostree_ensure_repo_writable (OstreeRepo *repo, GError **error);