Use glnx_unref_object instead of gs_unref_object

For non-GIO object types, at least until autocleanup support for GObject
based types becomes more widespread.
This commit is contained in:
Matthew Barnes 2015-05-05 10:33:53 -04:00
parent 4ee1acd981
commit 6a5f7b1288
48 changed files with 123 additions and 123 deletions

View File

@ -294,8 +294,8 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader *bootloader,
g_autoptr(GFile) efi_new_config_temp = NULL;
g_autoptr(GFile) efi_orig_config = NULL;
g_autoptr(GFile) new_config_path = NULL;
gs_unref_object GSSubprocessContext *procctx = NULL;
gs_unref_object GSSubprocess *proc = NULL;
glnx_unref_object GSSubprocessContext *procctx = NULL;
glnx_unref_object GSSubprocess *proc = NULL;
gs_strfreev char **child_env = g_get_environ ();
g_autofree char *bootversion_str = g_strdup_printf ("%u", (guint)bootversion);
g_autoptr(GFile) config_path_efi_dir = NULL;

View File

@ -139,7 +139,7 @@ ostree_deployment_set_origin (OstreeDeployment *self, GKeyFile *origin)
OstreeDeployment *
ostree_deployment_clone (OstreeDeployment *self)
{
gs_unref_object OstreeBootconfigParser *new_bootconfig = NULL;
glnx_unref_object OstreeBootconfigParser *new_bootconfig = NULL;
GKeyFile *new_origin = NULL;
OstreeDeployment *ret = ostree_deployment_new (self->index, self->osname, self->csum,
self->deployserial,

View File

@ -446,7 +446,7 @@ on_request_sent (GObject *object,
{
OstreeFetcherPendingURI *pending = user_data;
GError *local_error = NULL;
gs_unref_object SoupMessage *msg = NULL;
glnx_unref_object SoupMessage *msg = NULL;
pending->state = OSTREE_FETCHER_STATE_COMPLETE;
pending->request_body = soup_request_send_finish ((SoupRequest*) object,

View File

@ -184,7 +184,7 @@ ostree_mutable_tree_ensure_dir (OstreeMutableTree *self,
GError **error)
{
gboolean ret = FALSE;
gs_unref_object OstreeMutableTree *ret_dir = NULL;
glnx_unref_object OstreeMutableTree *ret_dir = NULL;
g_return_val_if_fail (name != NULL, FALSE);
@ -217,7 +217,7 @@ ostree_mutable_tree_lookup (OstreeMutableTree *self,
GError **error)
{
gboolean ret = FALSE;
gs_unref_object OstreeMutableTree *ret_subdir = NULL;
glnx_unref_object OstreeMutableTree *ret_subdir = NULL;
g_autofree char *ret_file_checksum = NULL;
ret_subdir = ot_gobject_refz (g_hash_table_lookup (self->subdirs, name));
@ -259,7 +259,7 @@ ostree_mutable_tree_ensure_parent_dirs (OstreeMutableTree *self,
gboolean ret = FALSE;
int i;
OstreeMutableTree *subdir = self; /* nofree */
gs_unref_object OstreeMutableTree *ret_parent = NULL;
glnx_unref_object OstreeMutableTree *ret_parent = NULL;
g_assert (metadata_checksum != NULL);

View File

@ -539,7 +539,7 @@ write_object (OstreeRepo *self,
g_autofree char *temp_filename = NULL;
g_autoptr(GFile) stored_path = NULL;
g_autofree guchar *ret_csum = NULL;
gs_unref_object OstreeChecksumInputStream *checksum_input = NULL;
glnx_unref_object OstreeChecksumInputStream *checksum_input = NULL;
g_autoptr(GInputStream) file_input = NULL;
g_autoptr(GFileInfo) file_info = NULL;
gs_unref_variant GVariant *xattrs = NULL;
@ -2278,7 +2278,7 @@ write_directory_content_to_mtree_internal (OstreeRepo *self,
gboolean ret = FALSE;
g_autoptr(GFile) child = NULL;
g_autoptr(GFileInfo) modified_info = NULL;
gs_unref_object OstreeMutableTree *child_mtree = NULL;
glnx_unref_object OstreeMutableTree *child_mtree = NULL;
g_autofree char *child_relpath = NULL;
const char *name;
GFileType file_type;

View File

@ -125,11 +125,11 @@ write_libarchive_entry_to_mtree (OstreeRepo *self,
g_autoptr(GFileInfo) file_info = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
gs_unref_ptrarray GPtrArray *hardlink_split_path = NULL;
gs_unref_object OstreeMutableTree *subdir = NULL;
gs_unref_object OstreeMutableTree *parent = NULL;
gs_unref_object OstreeMutableTree *hardlink_source_parent = NULL;
glnx_unref_object OstreeMutableTree *subdir = NULL;
glnx_unref_object OstreeMutableTree *parent = NULL;
glnx_unref_object OstreeMutableTree *hardlink_source_parent = NULL;
g_autofree char *hardlink_source_checksum = NULL;
gs_unref_object OstreeMutableTree *hardlink_source_subdir = NULL;
glnx_unref_object OstreeMutableTree *hardlink_source_subdir = NULL;
g_autofree guchar *tmp_csum = NULL;
g_autofree char *tmp_checksum = NULL;

View File

@ -964,7 +964,7 @@ scan_commit_object (OtPullData *pull_data,
if (pull_data->gpg_verify)
{
gs_unref_object OstreeGpgVerifyResult *result = NULL;
glnx_unref_object OstreeGpgVerifyResult *result = NULL;
result = ostree_repo_verify_commit_ext (pull_data->repo,
checksum,
@ -1640,7 +1640,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
gs_unref_hashtable GHashTable *requested_refs_to_fetch = NULL;
gs_unref_hashtable GHashTable *commits_to_fetch = NULL;
g_autofree char *remote_mode_str = NULL;
gs_unref_object OstreeMetalink *metalink = NULL;
glnx_unref_object OstreeMetalink *metalink = NULL;
OtPullData pull_data_real = { 0, };
OtPullData *pull_data = &pull_data_real;
GKeyFile *remote_config = NULL;

View File

@ -3253,7 +3253,7 @@ ostree_repo_sign_commit (OstreeRepo *self,
gs_unref_variant GVariant *commit_variant = NULL;
gs_unref_variant GVariant *old_metadata = NULL;
gs_unref_variant GVariant *new_metadata = NULL;
gs_unref_object OstreeGpgVerifyResult *result = NULL;
glnx_unref_object OstreeGpgVerifyResult *result = NULL;
GError *local_error = NULL;
if (!ostree_repo_load_variant (self, OSTREE_OBJECT_TYPE_COMMIT,
@ -3409,7 +3409,7 @@ _ostree_repo_gpg_verify_with_metadata (OstreeRepo *self,
GError **error)
{
OstreeGpgVerifyResult *result = NULL;
gs_unref_object OstreeGpgVerifier *verifier = NULL;
glnx_unref_object OstreeGpgVerifier *verifier = NULL;
gs_unref_variant GVariant *signaturedata = NULL;
GByteArray *buffer;
GVariantIter iter;
@ -3489,7 +3489,7 @@ ostree_repo_verify_commit (OstreeRepo *self,
GCancellable *cancellable,
GError **error)
{
gs_unref_object OstreeGpgVerifyResult *result = NULL;
glnx_unref_object OstreeGpgVerifyResult *result = NULL;
gboolean ret = FALSE;
result = ostree_repo_verify_commit_ext (self, commit_checksum,

View File

@ -62,7 +62,7 @@ _ostree_sysroot_list_deployment_dirs_for_os (GFile *osdir,
const char *name;
GFileInfo *file_info = NULL;
GFile *child = NULL;
gs_unref_object OstreeDeployment *deployment = NULL;
glnx_unref_object OstreeDeployment *deployment = NULL;
g_autofree char *csum = NULL;
gint deployserial;
@ -503,7 +503,7 @@ ostree_sysroot_cleanup (OstreeSysroot *self,
GError **error)
{
gboolean ret = FALSE;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
g_return_val_if_fail (self->loaded, FALSE);

View File

@ -740,7 +740,7 @@ merge_configuration (OstreeSysroot *sysroot,
g_autoptr(GFile) source_etc_pristine_path = NULL;
g_autoptr(GFile) deployment_usretc_path = NULL;
g_autoptr(GFile) deployment_etc_path = NULL;
gs_unref_object OstreeSePolicy *sepolicy = NULL;
glnx_unref_object OstreeSePolicy *sepolicy = NULL;
gboolean etc_exists;
gboolean usretc_exists;
@ -1582,9 +1582,9 @@ ostree_sysroot_write_deployments (OstreeSysroot *self,
else
{
int new_bootversion = self->bootversion ? 0 : 1;
gs_unref_object OstreeBootloader *bootloader = NULL;
glnx_unref_object OstreeBootloader *bootloader = NULL;
g_autoptr(GFile) new_loader_entries_dir = NULL;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
gboolean show_osname = FALSE;
if (!_ostree_sysroot_query_bootloader (self, &bootloader, cancellable, error))
@ -1765,18 +1765,18 @@ ostree_sysroot_deploy_tree (OstreeSysroot *self,
{
gboolean ret = FALSE;
gint new_deployserial;
gs_unref_object OstreeDeployment *new_deployment = NULL;
gs_unref_object OstreeDeployment *merge_deployment = NULL;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeDeployment *new_deployment = NULL;
glnx_unref_object OstreeDeployment *merge_deployment = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
g_autoptr(GFile) osdeploydir = NULL;
g_autoptr(GFile) deployment_var = NULL;
g_autoptr(GFile) commit_root = NULL;
g_autoptr(GFile) tree_kernel_path = NULL;
g_autoptr(GFile) tree_initramfs_path = NULL;
glnx_fd_close int deployment_dfd = -1;
gs_unref_object OstreeSePolicy *sepolicy = NULL;
glnx_unref_object OstreeSePolicy *sepolicy = NULL;
g_autofree char *new_bootcsum = NULL;
gs_unref_object OstreeBootconfigParser *bootconfig = NULL;
glnx_unref_object OstreeBootconfigParser *bootconfig = NULL;
g_return_val_if_fail (osname != NULL || self->booted_deployment != NULL, FALSE);
@ -1923,7 +1923,7 @@ ostree_sysroot_deployment_set_kargs (OstreeSysroot *self,
gboolean ret = FALSE;
guint i;
gs_unref_ptrarray GPtrArray *new_deployments = g_ptr_array_new_with_free_func (g_object_unref);
gs_unref_object OstreeDeployment *new_deployment = NULL;
glnx_unref_object OstreeDeployment *new_deployment = NULL;
__attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *kargs = NULL;
g_autofree char *new_options = NULL;
OstreeBootconfigParser *new_bootconfig;

View File

@ -493,7 +493,7 @@ ostree_sysroot_upgrader_pull_one_dir (OstreeSysrootUpgrader *self,
GError **error)
{
gboolean ret = FALSE;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
char *refs_to_fetch[] = { self->origin_ref, NULL };
const char *from_revision = NULL;
g_autofree char *new_revision = NULL;
@ -564,7 +564,7 @@ ostree_sysroot_upgrader_deploy (OstreeSysrootUpgrader *self,
GError **error)
{
gboolean ret = FALSE;
gs_unref_object OstreeDeployment *new_deployment = NULL;
glnx_unref_object OstreeDeployment *new_deployment = NULL;
if (!ostree_sysroot_deploy_tree (self->sysroot, self->osname,
self->new_revision,

View File

@ -256,7 +256,7 @@ ostree_sysroot_ensure_initialized (OstreeSysroot *self,
dir = ot_gfile_get_child_build_path (ostree_dir, "repo", "objects", NULL);
if (!g_file_query_exists (dir, NULL))
{
gs_unref_object OstreeRepo *repo = ostree_repo_new (repo_dir);
glnx_unref_object OstreeRepo *repo = ostree_repo_new (repo_dir);
if (!ostree_repo_create (repo, OSTREE_REPO_MODE_BARE,
cancellable, error))
goto out;
@ -416,7 +416,7 @@ _ostree_sysroot_read_boot_loader_configs (OstreeSysroot *self,
g_str_has_suffix (dent->d_name, ".conf") &&
S_ISREG (stbuf.st_mode))
{
gs_unref_object OstreeBootconfigParser *config = ostree_bootconfig_parser_new ();
glnx_unref_object OstreeBootconfigParser *config = ostree_bootconfig_parser_new ();
if (!ostree_bootconfig_parser_parse_at (config, dfd_iter.fd, dent->d_name, cancellable, error))
{
@ -584,7 +584,7 @@ parse_deployment (OstreeSysroot *self,
{
gboolean ret = FALSE;
const char *relative_boot_link;
gs_unref_object OstreeDeployment *ret_deployment = NULL;
glnx_unref_object OstreeDeployment *ret_deployment = NULL;
int entry_boot_version;
int treebootserial = -1;
int deployserial = -1;
@ -676,7 +676,7 @@ list_deployments_process_one_boot_entry (OstreeSysroot *self,
{
gboolean ret = FALSE;
g_autofree char *ostree_arg = NULL;
gs_unref_object OstreeDeployment *deployment = NULL;
glnx_unref_object OstreeDeployment *deployment = NULL;
ostree_arg = get_ostree_kernel_arg_from_config (config);
if (ostree_arg == NULL)
@ -935,7 +935,7 @@ _ostree_sysroot_query_bootloader (OstreeSysroot *sysroot,
{
gboolean ret = FALSE;
gboolean is_active;
gs_unref_object OstreeBootloader *ret_loader = NULL;
glnx_unref_object OstreeBootloader *ret_loader = NULL;
ret_loader = (OstreeBootloader*)_ostree_bootloader_syslinux_new (sysroot);
if (!_ostree_bootloader_query (ret_loader, &is_active,
@ -1021,7 +1021,7 @@ find_booted_deployment (OstreeSysroot *self,
gboolean ret = FALSE;
struct stat root_stbuf;
struct stat self_stbuf;
gs_unref_object OstreeDeployment *ret_deployment = NULL;
glnx_unref_object OstreeDeployment *ret_deployment = NULL;
if (stat ("/", &root_stbuf) != 0)
{

View File

@ -38,7 +38,7 @@ gboolean
ot_admin_builtin_cleanup (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
gs_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
gboolean ret = FALSE;
context = g_option_context_new ("Delete untagged deployments and repository objects");

View File

@ -55,12 +55,12 @@ ot_admin_builtin_deploy (int argc, char **argv, GCancellable *cancellable, GErro
gboolean ret = FALSE;
const char *refspec;
GOptionContext *context;
gs_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
GKeyFile *origin = NULL;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
gs_unref_ptrarray GPtrArray *new_deployments = NULL;
gs_unref_object OstreeDeployment *new_deployment = NULL;
gs_unref_object OstreeDeployment *merge_deployment = NULL;
glnx_unref_object OstreeDeployment *new_deployment = NULL;
glnx_unref_object OstreeDeployment *merge_deployment = NULL;
g_autofree char *revision = NULL;
__attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *kargs = NULL;

View File

@ -41,9 +41,9 @@ gboolean
ot_admin_builtin_diff (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
gs_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
gboolean ret = FALSE;
gs_unref_object OstreeDeployment *deployment = NULL;
glnx_unref_object OstreeDeployment *deployment = NULL;
g_autoptr(GFile) deployment_dir = NULL;
gs_unref_ptrarray GPtrArray *modified = NULL;
gs_unref_ptrarray GPtrArray *removed = NULL;

View File

@ -38,11 +38,11 @@ gboolean
ot_admin_builtin_init_fs (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
gs_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
gboolean ret = FALSE;
g_autoptr(GFile) dir = NULL;
g_autoptr(GFile) child = NULL;
gs_unref_object OstreeSysroot *target_sysroot = NULL;
glnx_unref_object OstreeSysroot *target_sysroot = NULL;
guint i;
const char *normal_toplevels[] = {"boot", "dev", "home", "proc", "run", "sys"};

View File

@ -38,7 +38,7 @@ gboolean
ot_admin_builtin_os_init (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
gs_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
gboolean ret = FALSE;
const char *osname = NULL;
g_autoptr(GFile) deploy_dir = NULL;

View File

@ -49,8 +49,8 @@ ot_admin_builtin_set_origin (int argc, char **argv, GCancellable *cancellable, G
const char *remotename = NULL;
const char *url = NULL;
const char *branch = NULL;
gs_unref_object OstreeRepo *repo = NULL;
gs_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
OstreeDeployment *target_deployment = NULL;
context = g_option_context_new ("REMOTENAME URL [BRANCH]");

View File

@ -85,9 +85,9 @@ gboolean
ot_admin_builtin_status (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
gs_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
gboolean ret = FALSE;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
OstreeDeployment *booted_deployment = NULL;
gs_unref_ptrarray GPtrArray *deployments = NULL;
guint i;
@ -120,7 +120,7 @@ ot_admin_builtin_status (int argc, char **argv, GCancellable *cancellable, GErro
GKeyFile *origin;
const char *ref = ostree_deployment_get_csum (deployment);
g_autofree char *version = version_of_commit (repo, ref);
gs_unref_object OstreeGpgVerifyResult *result = NULL;
glnx_unref_object OstreeGpgVerifyResult *result = NULL;
GString *output_buffer;
guint jj, n_signatures;
GError *local_error = NULL;

View File

@ -44,9 +44,9 @@ ot_admin_builtin_switch (int argc, char **argv, GCancellable *cancellable, GErro
{
gboolean ret = FALSE;
GOptionContext *context;
gs_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
const char *new_provided_refspec = NULL;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
g_autofree char *origin_refspec = NULL;
g_autofree char *origin_remote = NULL;
g_autofree char *origin_ref = NULL;
@ -56,10 +56,10 @@ ot_admin_builtin_switch (int argc, char **argv, GCancellable *cancellable, GErro
g_autofree char *new_revision = NULL;
g_autoptr(GFile) deployment_path = NULL;
g_autoptr(GFile) deployment_origin_path = NULL;
gs_unref_object OstreeDeployment *merge_deployment = NULL;
gs_unref_object OstreeDeployment *new_deployment = NULL;
gs_unref_object OstreeSysrootUpgrader *upgrader = NULL;
gs_unref_object OstreeAsyncProgress *progress = NULL;
glnx_unref_object OstreeDeployment *merge_deployment = NULL;
glnx_unref_object OstreeDeployment *new_deployment = NULL;
glnx_unref_object OstreeSysrootUpgrader *upgrader = NULL;
glnx_unref_object OstreeAsyncProgress *progress = NULL;
gboolean changed;
GSConsole *console = NULL;
gboolean in_status_line = FALSE;

View File

@ -37,12 +37,12 @@ ot_admin_builtin_undeploy (int argc, char **argv, GCancellable *cancellable, GEr
{
gboolean ret = FALSE;
GOptionContext *context;
gs_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
const char *deploy_index_str;
int deploy_index;
gs_unref_ptrarray GPtrArray *current_deployments = NULL;
gs_unref_object OstreeDeployment *booted_deployment = NULL;
gs_unref_object OstreeDeployment *target_deployment = NULL;
glnx_unref_object OstreeDeployment *booted_deployment = NULL;
glnx_unref_object OstreeDeployment *target_deployment = NULL;
context = g_option_context_new ("INDEX - Delete deployment INDEX");

View File

@ -49,19 +49,19 @@ ot_admin_builtin_upgrade (int argc, char **argv, GCancellable *cancellable, GErr
{
gboolean ret = FALSE;
GOptionContext *context;
gs_unref_object OstreeSysroot *sysroot = NULL;
gs_unref_object OstreeSysrootUpgrader *upgrader = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeSysrootUpgrader *upgrader = NULL;
g_autofree char *origin_remote = NULL;
g_autofree char *origin_ref = NULL;
g_autofree char *origin_refspec = NULL;
g_autofree char *new_revision = NULL;
g_autoptr(GFile) deployment_path = NULL;
g_autoptr(GFile) deployment_origin_path = NULL;
gs_unref_object OstreeDeployment *merge_deployment = NULL;
gs_unref_object OstreeDeployment *new_deployment = NULL;
glnx_unref_object OstreeDeployment *merge_deployment = NULL;
glnx_unref_object OstreeDeployment *new_deployment = NULL;
GSConsole *console = NULL;
gboolean in_status_line = FALSE;
gs_unref_object OstreeAsyncProgress *progress = NULL;
glnx_unref_object OstreeAsyncProgress *progress = NULL;
gboolean changed;
OstreeSysrootUpgraderPullFlags upgraderpullflags = 0;

View File

@ -39,10 +39,10 @@ ot_admin_instutil_builtin_grub2_generate (int argc, char **argv, GCancellable *c
gboolean ret = FALSE;
guint bootversion;
g_autoptr(GFile) subpath = NULL;
gs_unref_object OstreeSePolicy *sepolicy = NULL;
glnx_unref_object OstreeSePolicy *sepolicy = NULL;
gs_unref_ptrarray GPtrArray *deployments = NULL;
GOptionContext *context = NULL;
gs_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
g_autoptr(GFile) deployment_path = NULL;
context = g_option_context_new ("[BOOTVERSION] - generate GRUB2 configuration from given BLS entries");

View File

@ -185,11 +185,11 @@ ot_admin_instutil_builtin_selinux_ensure_labeled (int argc, char **argv, GCancel
const char *policy_name;
g_autoptr(GFile) subpath = NULL;
const char *prefix = NULL;
gs_unref_object OstreeSePolicy *sepolicy = NULL;
glnx_unref_object OstreeSePolicy *sepolicy = NULL;
gs_unref_ptrarray GPtrArray *deployments = NULL;
OstreeDeployment *first_deployment;
GOptionContext *context = NULL;
gs_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
g_autoptr(GFile) deployment_path = NULL;
context = g_option_context_new ("[SUBPATH PREFIX] - relabel all or part of a deployment");

View File

@ -51,7 +51,7 @@ ot_admin_instutil_builtin_set_kargs (int argc, char **argv, GCancellable *cancel
gs_unref_ptrarray GPtrArray *deployments = NULL;
OstreeDeployment *first_deployment = NULL;
GOptionContext *context = NULL;
gs_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
__attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *kargs = NULL;
context = g_option_context_new ("ARGS - set new kernel command line arguments");

View File

@ -62,7 +62,7 @@ gboolean
ostree_builtin_cat (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
int i;
const char *rev;

View File

@ -225,7 +225,7 @@ gboolean
ostree_builtin_checkout (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
const char *commit;
const char *destination;

View File

@ -292,7 +292,7 @@ gboolean
ostree_builtin_commit (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
gboolean skip_commit = FALSE;
g_autoptr(GFile) arg = NULL;
@ -301,7 +301,7 @@ ostree_builtin_commit (int argc, char **argv, GCancellable *cancellable, GError
g_autoptr(GFile) root = NULL;
gs_unref_variant GVariant *metadata = NULL;
gs_unref_variant GVariant *detached_metadata = NULL;
gs_unref_object OstreeMutableTree *mtree = NULL;
glnx_unref_object OstreeMutableTree *mtree = NULL;
g_autofree char *tree_type = NULL;
gs_unref_hashtable GHashTable *mode_adds = NULL;
OstreeRepoCommitModifierFlags flags = 0;

View File

@ -56,7 +56,7 @@ gboolean
ostree_builtin_config (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context = NULL;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
const char *op;
const char *section_key;

View File

@ -120,7 +120,7 @@ ostree_builtin_diff (int argc, char **argv, GCancellable *cancellable, GError **
{
gboolean ret = FALSE;
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
const char *src;
const char *target;
g_autofree char *src_prev = NULL;

View File

@ -239,7 +239,7 @@ ostree_builtin_fsck (int argc, char **argv, GCancellable *cancellable, GError **
{
gboolean ret = FALSE;
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
GHashTableIter hash_iter;
gpointer key, value;
gboolean found_corruption = FALSE;

View File

@ -54,7 +54,7 @@ delete_signatures (OstreeRepo *repo,
GError **error)
{
GVariantDict metadata_dict;
gs_unref_object OstreeGpgVerifyResult *result = NULL;
glnx_unref_object OstreeGpgVerifyResult *result = NULL;
gs_unref_variant GVariant *old_metadata = NULL;
gs_unref_variant GVariant *new_metadata = NULL;
gs_unref_variant GVariant *signature_data = NULL;
@ -198,7 +198,7 @@ gboolean
ostree_builtin_gpg_sign (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
g_autofree char *resolved_commit = NULL;
const char *commit;
char **key_ids;

View File

@ -38,7 +38,7 @@ gboolean
ostree_builtin_init (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context = NULL;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
OstreeRepoMode mode;

View File

@ -82,7 +82,7 @@ ostree_builtin_log (int argc,
GError **error)
{
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
const char *rev;
g_autofree char *checksum = NULL;

View File

@ -243,7 +243,7 @@ gboolean
ostree_builtin_ls (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
const char *rev;
int i;

View File

@ -43,7 +43,7 @@ ostree_builtin_prune (int argc, char **argv, GCancellable *cancellable, GError *
{
gboolean ret = FALSE;
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
g_autofree char *formatted_freed_size = NULL;
OstreeRepoPruneFlags pruneflags = 0;
gint n_objects_total;

View File

@ -44,12 +44,12 @@ ostree_builtin_pull_local (int argc, char **argv, GCancellable *cancellable, GEr
{
gboolean ret = FALSE;
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
int i;
const char *src_repo_arg;
GSConsole *console = NULL;
g_autofree char *src_repo_uri = NULL;
gs_unref_object OstreeAsyncProgress *progress = NULL;
glnx_unref_object OstreeAsyncProgress *progress = NULL;
gs_unref_ptrarray GPtrArray *refs_to_fetch = NULL;
gs_unref_hashtable GHashTable *source_objects = NULL;
@ -87,7 +87,7 @@ ostree_builtin_pull_local (int argc, char **argv, GCancellable *cancellable, GEr
if (argc == 2)
{
g_autoptr(GFile) src_repo_path = g_file_new_for_path (src_repo_arg);
gs_unref_object OstreeRepo *src_repo = ostree_repo_new (src_repo_path);
glnx_unref_object OstreeRepo *src_repo = ostree_repo_new (src_repo_path);
gs_unref_hashtable GHashTable *refs_to_clone = NULL;
refs_to_fetch = g_ptr_array_new_with_free_func (g_free);

View File

@ -58,13 +58,13 @@ gboolean
ostree_builtin_pull (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
g_autofree char *remote = NULL;
OstreeRepoPullFlags pullflags = 0;
GSConsole *console = NULL;
gs_unref_ptrarray GPtrArray *refs_to_fetch = NULL;
gs_unref_object OstreeAsyncProgress *progress = NULL;
glnx_unref_object OstreeAsyncProgress *progress = NULL;
gulong signal_handler_id = 0;
context = g_option_context_new ("REMOTE [BRANCH...] - Download data from remote repository");

View File

@ -39,7 +39,7 @@ ostree_builtin_refs (int argc, char **argv, GCancellable *cancellable, GError **
{
gboolean ret = FALSE;
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
const char *refspec_prefix = NULL;
gs_unref_hashtable GHashTable *refs = NULL;
GHashTableIter hashiter;

View File

@ -56,7 +56,7 @@ ostree_builtin_reset (int argc,
GError **error)
{
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
const char *ref;
const char *target = NULL;

View File

@ -35,7 +35,7 @@ gboolean
ostree_builtin_rev_parse (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
const char *rev = "master";
int i;

View File

@ -169,7 +169,7 @@ print_object (OstreeRepo *repo,
if (objtype == OSTREE_OBJECT_TYPE_COMMIT)
{
gs_unref_object OstreeGpgVerifyResult *result = NULL;
glnx_unref_object OstreeGpgVerifyResult *result = NULL;
GError *local_error = NULL;
g_autoptr(GFile) gpg_homedir = opt_gpg_homedir ? g_file_new_for_path (opt_gpg_homedir) : NULL;
@ -246,7 +246,7 @@ gboolean
ostree_builtin_show (int argc, char **argv, GCancellable *cancellable, GError **error)
{
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
gboolean ret = FALSE;
const char *rev;
g_autofree char *resolved_rev = NULL;

View File

@ -100,7 +100,7 @@ ot_static_delta_builtin_list (int argc, char **argv, GCancellable *cancellable,
gs_unref_ptrarray GPtrArray *delta_names = NULL;
guint i;
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
context = g_option_context_new ("LIST - list static delta files");
@ -134,7 +134,7 @@ ot_static_delta_builtin_generate (int argc, char **argv, GCancellable *cancellab
{
gboolean ret = FALSE;
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
context = g_option_context_new ("Generate static delta files");
if (!ostree_option_context_parse (context, generate_options, &argc, &argv, OSTREE_BUILTIN_FLAG_NONE, &repo, cancellable, error))
@ -245,7 +245,7 @@ ot_static_delta_builtin_apply_offline (int argc, char **argv, GCancellable *canc
const char *patharg;
g_autoptr(GFile) path = NULL;
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
context = g_option_context_new ("DELTA - Apply static delta file");
if (!ostree_option_context_parse (context, apply_offline_options, &argc, &argv, OSTREE_BUILTIN_FLAG_NONE, &repo, cancellable, error))
@ -286,7 +286,7 @@ ostree_builtin_static_delta (int argc, char **argv, GCancellable *cancellable, G
gboolean ret = FALSE;
OstreeCommand *command = NULL;
const char *cmdname = NULL;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
int i;
gboolean want_help = FALSE;

View File

@ -37,7 +37,7 @@ ostree_builtin_summary (int argc, char **argv, GCancellable *cancellable, GError
{
gboolean ret = FALSE;
GOptionContext *context;
gs_unref_object OstreeRepo *repo = NULL;
glnx_unref_object OstreeRepo *repo = NULL;
context = g_option_context_new ("Manage summary metadata");

View File

@ -332,7 +332,7 @@ ostree_builtin_trivial_httpd (int argc, char **argv, GCancellable *cancellable,
const char *dirpath;
OtTrivialHttpd appstruct = { 0, };
OtTrivialHttpd *app = &appstruct;
gs_unref_object SoupServer *server = NULL;
glnx_unref_object SoupServer *server = NULL;
g_autoptr(GFileMonitor) dirmon = NULL;
context = g_option_context_new ("[DIR] - Simple webserver");

View File

@ -62,8 +62,8 @@ ot_editor_prompt (OstreeRepo *repo,
GCancellable *cancellable,
GError **error)
{
gs_unref_object GSSubprocessContext *ctx = NULL;
gs_unref_object GSSubprocess *proc = NULL;
glnx_unref_object GSSubprocessContext *ctx = NULL;
glnx_unref_object GSSubprocess *proc = NULL;
g_autoptr(GFile) file = NULL;
g_autoptr(GFileIOStream) io = NULL;
GOutputStream *output;

View File

@ -312,7 +312,7 @@ ostree_admin_option_context_parse (GOptionContext *context,
GError **error)
{
g_autoptr(GFile) sysroot_path = NULL;
gs_unref_object OstreeSysroot *sysroot = NULL;
glnx_unref_object OstreeSysroot *sysroot = NULL;
gboolean success = FALSE;
/* Entries are listed in --help output in the order added. We add the

View File

@ -32,7 +32,7 @@ static void
test_metadata_checksum (void)
{
const char *checksum = "12345678901234567890123456789012";
gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
g_assert_null (ostree_mutable_tree_get_metadata_checksum (tree));
@ -44,8 +44,8 @@ test_metadata_checksum (void)
static void
test_mutable_tree_walk (void)
{
gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
gs_unref_object OstreeMutableTree *parent = NULL;
glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
glnx_unref_object OstreeMutableTree *parent = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
GError *error = NULL;
const char *pathname = "a/b/c/d/e/f/g/i";
@ -57,21 +57,21 @@ test_mutable_tree_walk (void)
checksum, &parent,
&error));
{
gs_unref_object OstreeMutableTree *subdir = NULL;
glnx_unref_object OstreeMutableTree *subdir = NULL;
g_assert (ostree_mutable_tree_walk (tree, split_path, 0, &subdir, &error));
g_assert_nonnull (subdir);
}
{
gs_unref_object OstreeMutableTree *subdir = NULL;
glnx_unref_object OstreeMutableTree *subdir = NULL;
g_assert_false (ostree_mutable_tree_walk (tree, split_path, 1, &subdir, &error));
g_assert_null (subdir);
g_clear_error (&error);
}
{
gs_unref_object OstreeMutableTree *subdir = NULL;
gs_unref_object OstreeMutableTree *a = NULL;
glnx_unref_object OstreeMutableTree *subdir = NULL;
glnx_unref_object OstreeMutableTree *a = NULL;
g_autofree char *source_checksum = NULL;
ostree_mutable_tree_lookup (tree, "a", &source_checksum, &a, &error);
g_assert (ostree_mutable_tree_walk (a, split_path, 1, &subdir, &error));
@ -82,16 +82,16 @@ test_mutable_tree_walk (void)
static void
test_ensure_parent_dirs (void)
{
gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
gs_unref_object OstreeMutableTree *parent = NULL;
glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
glnx_unref_object OstreeMutableTree *parent = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
GError *error = NULL;
const char *pathname = "/foo/bar/baz";
const char *checksum = "01234567890123456789012345678901";
g_autofree char *source_checksum = NULL;
gs_unref_object OstreeMutableTree *source_subdir = NULL;
glnx_unref_object OstreeMutableTree *source_subdir = NULL;
g_autofree char *source_checksum2 = NULL;
gs_unref_object OstreeMutableTree *source_subdir2 = NULL;
glnx_unref_object OstreeMutableTree *source_subdir2 = NULL;
g_assert (ot_util_path_split_validate (pathname, &split_path, &error));
@ -109,15 +109,15 @@ test_ensure_parent_dirs (void)
static void
test_ensure_dir (void)
{
gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
gs_unref_object OstreeMutableTree *parent = NULL;
glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
glnx_unref_object OstreeMutableTree *parent = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
GError *error = NULL;
const char *dirname = "foo";
const char *filename = "bar";
const char *checksum = "01234567890123456789012345678901";
g_autofree char *source_checksum = NULL;
gs_unref_object OstreeMutableTree *source_subdir = NULL;
glnx_unref_object OstreeMutableTree *source_subdir = NULL;
g_assert (ostree_mutable_tree_ensure_dir (tree, dirname, &parent, &error));
g_assert (ostree_mutable_tree_lookup (tree, dirname, &source_checksum, &source_subdir, &error));
@ -129,8 +129,8 @@ test_ensure_dir (void)
static void
test_replace_file (void)
{
gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
gs_unref_object OstreeMutableTree *parent = NULL;
glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
glnx_unref_object OstreeMutableTree *parent = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
GError *error = NULL;
const char *filename = "bar";
@ -140,7 +140,7 @@ test_replace_file (void)
g_assert (ostree_mutable_tree_replace_file (tree, filename, checksum, &error));
{
g_autofree char *out_checksum = NULL;
gs_unref_object OstreeMutableTree *subdir = NULL;
glnx_unref_object OstreeMutableTree *subdir = NULL;
g_assert (ostree_mutable_tree_lookup (tree, filename, &out_checksum, &subdir, &error));
g_assert_cmpstr (checksum, ==, out_checksum);
}
@ -148,7 +148,7 @@ test_replace_file (void)
g_assert (ostree_mutable_tree_replace_file (tree, filename, checksum2, &error));
{
g_autofree char *out_checksum = NULL;
gs_unref_object OstreeMutableTree *subdir = NULL;
glnx_unref_object OstreeMutableTree *subdir = NULL;
g_assert (ostree_mutable_tree_lookup (tree, filename, &out_checksum, &subdir, &error));
g_assert_cmpstr (checksum2, ==, out_checksum);
}
@ -159,8 +159,8 @@ test_contents_checksum (void)
{
const char *checksum = "01234567890123456789012345678901";
const char *subdir_checksum = "ABCD0123456789012345678901234567";
gs_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
gs_unref_object OstreeMutableTree *subdir = NULL;
glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
glnx_unref_object OstreeMutableTree *subdir = NULL;
GError *error = NULL;
g_assert_null (ostree_mutable_tree_get_contents_checksum (tree));