diff options
author | Colin Walters <walters@verbum.org> | 2013-07-29 18:44:41 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2013-07-29 18:44:41 -0400 |
commit | 8d5b8dd740452111dd9bd8e83545a21d1cf0916a (patch) | |
tree | 68bfe4830d0ba936adf2d8b4a1d2f30c52dc5be6 /src/ostree/ot-admin-builtin-os-init.c | |
parent | 760b8661042f31a856fa768a52f8675d3e345855 (diff) | |
download | ostree-8d5b8dd740452111dd9bd8e83545a21d1cf0916a.tar.gz |
admin: Clean up builtin prototype
Pass through GCancellable, and just use GFile *sysroot, since that's
all OtAdminBuiltinOpts was.
Diffstat (limited to 'src/ostree/ot-admin-builtin-os-init.c')
-rw-r--r-- | src/ostree/ot-admin-builtin-os-init.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ostree/ot-admin-builtin-os-init.c b/src/ostree/ot-admin-builtin-os-init.c index ddb641fd..b9e85709 100644 --- a/src/ostree/ot-admin-builtin-os-init.c +++ b/src/ostree/ot-admin-builtin-os-init.c @@ -34,14 +34,13 @@ static GOptionEntry options[] = { }; gboolean -ot_admin_builtin_os_init (int argc, char **argv, OtAdminBuiltinOpts *admin_opts, GError **error) +ot_admin_builtin_os_init (int argc, char **argv, GFile *sysroot, GCancellable *cancellable, GError **error) { GOptionContext *context; gboolean ret = FALSE; const char *osname = NULL; gs_unref_object GFile *deploy_dir = NULL; gs_unref_object GFile *dir = NULL; - __attribute__((unused)) GCancellable *cancellable = NULL; context = g_option_context_new ("OSNAME - Initialize empty state for given operating system"); g_option_context_add_main_entries (context, options, NULL); @@ -49,7 +48,7 @@ ot_admin_builtin_os_init (int argc, char **argv, OtAdminBuiltinOpts *admin_opts, if (!g_option_context_parse (context, &argc, &argv, error)) goto out; - if (!ot_admin_ensure_initialized (admin_opts->sysroot, cancellable, error)) + if (!ot_admin_ensure_initialized (sysroot, cancellable, error)) goto out; if (argc < 2) @@ -60,7 +59,7 @@ ot_admin_builtin_os_init (int argc, char **argv, OtAdminBuiltinOpts *admin_opts, osname = argv[1]; - deploy_dir = ot_gfile_get_child_build_path (admin_opts->sysroot, "ostree", "deploy", osname, NULL); + deploy_dir = ot_gfile_get_child_build_path (sysroot, "ostree", "deploy", osname, NULL); /* Ensure core subdirectories of /var exist, since we need them for * dracut generation, and the host will want them too. Note that at |