[ostree] Use glnx_unref_object instead of gs_unref_object



commit 6a5f7b1288d3d6634922bf3cb2370474cd5a22f7
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue May 5 10:33:53 2015 -0400

    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.

 src/libostree/ostree-bootloader-grub2.c            |    4 +-
 src/libostree/ostree-deployment.c                  |    2 +-
 src/libostree/ostree-fetcher.c                     |    2 +-
 src/libostree/ostree-mutable-tree.c                |    6 +-
 src/libostree/ostree-repo-commit.c                 |    4 +-
 src/libostree/ostree-repo-libarchive.c             |    8 ++--
 src/libostree/ostree-repo-pull.c                   |    4 +-
 src/libostree/ostree-repo.c                        |    6 +-
 src/libostree/ostree-sysroot-cleanup.c             |    4 +-
 src/libostree/ostree-sysroot-deploy.c              |   18 ++++----
 src/libostree/ostree-sysroot-upgrader.c            |    4 +-
 src/libostree/ostree-sysroot.c                     |   12 +++---
 src/ostree/ot-admin-builtin-cleanup.c              |    2 +-
 src/ostree/ot-admin-builtin-deploy.c               |    8 ++--
 src/ostree/ot-admin-builtin-diff.c                 |    4 +-
 src/ostree/ot-admin-builtin-init-fs.c              |    4 +-
 src/ostree/ot-admin-builtin-os-init.c              |    2 +-
 src/ostree/ot-admin-builtin-set-origin.c           |    4 +-
 src/ostree/ot-admin-builtin-status.c               |    6 +-
 src/ostree/ot-admin-builtin-switch.c               |   12 +++---
 src/ostree/ot-admin-builtin-undeploy.c             |    6 +-
 src/ostree/ot-admin-builtin-upgrade.c              |   10 ++--
 .../ot-admin-instutil-builtin-grub2-generate.c     |    4 +-
 ...admin-instutil-builtin-selinux-ensure-labeled.c |    4 +-
 src/ostree/ot-admin-instutil-builtin-set-kargs.c   |    2 +-
 src/ostree/ot-builtin-cat.c                        |    2 +-
 src/ostree/ot-builtin-checkout.c                   |    2 +-
 src/ostree/ot-builtin-commit.c                     |    4 +-
 src/ostree/ot-builtin-config.c                     |    2 +-
 src/ostree/ot-builtin-diff.c                       |    2 +-
 src/ostree/ot-builtin-fsck.c                       |    2 +-
 src/ostree/ot-builtin-gpg-sign.c                   |    4 +-
 src/ostree/ot-builtin-init.c                       |    2 +-
 src/ostree/ot-builtin-log.c                        |    2 +-
 src/ostree/ot-builtin-ls.c                         |    2 +-
 src/ostree/ot-builtin-prune.c                      |    2 +-
 src/ostree/ot-builtin-pull-local.c                 |    6 +-
 src/ostree/ot-builtin-pull.c                       |    4 +-
 src/ostree/ot-builtin-refs.c                       |    2 +-
 src/ostree/ot-builtin-reset.c                      |    2 +-
 src/ostree/ot-builtin-rev-parse.c                  |    2 +-
 src/ostree/ot-builtin-show.c                       |    4 +-
 src/ostree/ot-builtin-static-delta.c               |    8 ++--
 src/ostree/ot-builtin-summary.c                    |    2 +-
 src/ostree/ot-builtin-trivial-httpd.c              |    2 +-
 src/ostree/ot-editor.c                             |    4 +-
 src/ostree/ot-main.c                               |    2 +-
 tests/test-mutable-tree.c                          |   40 ++++++++++----------
 48 files changed, 123 insertions(+), 123 deletions(-)
---
diff --git a/src/libostree/ostree-bootloader-grub2.c b/src/libostree/ostree-bootloader-grub2.c
index f237e3d..d002995 100644
--- a/src/libostree/ostree-bootloader-grub2.c
+++ b/src/libostree/ostree-bootloader-grub2.c
@@ -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;
diff --git a/src/libostree/ostree-deployment.c b/src/libostree/ostree-deployment.c
index 85e8e4b..406490d 100644
--- a/src/libostree/ostree-deployment.c
+++ b/src/libostree/ostree-deployment.c
@@ -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,
diff --git a/src/libostree/ostree-fetcher.c b/src/libostree/ostree-fetcher.c
index c3072aa..c50a096 100644
--- a/src/libostree/ostree-fetcher.c
+++ b/src/libostree/ostree-fetcher.c
@@ -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,
diff --git a/src/libostree/ostree-mutable-tree.c b/src/libostree/ostree-mutable-tree.c
index 20cd2b2..cae5914 100644
--- a/src/libostree/ostree-mutable-tree.c
+++ b/src/libostree/ostree-mutable-tree.c
@@ -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);
 
diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c
index 8d61b0e..d26f00e 100644
--- a/src/libostree/ostree-repo-commit.c
+++ b/src/libostree/ostree-repo-commit.c
@@ -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;
diff --git a/src/libostree/ostree-repo-libarchive.c b/src/libostree/ostree-repo-libarchive.c
index 389f0f4..e55e6f4 100644
--- a/src/libostree/ostree-repo-libarchive.c
+++ b/src/libostree/ostree-repo-libarchive.c
@@ -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;
 
diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c
index 599ee49..0758970 100644
--- a/src/libostree/ostree-repo-pull.c
+++ b/src/libostree/ostree-repo-pull.c
@@ -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;
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index 1bf744a..a03e894 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -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,
diff --git a/src/libostree/ostree-sysroot-cleanup.c b/src/libostree/ostree-sysroot-cleanup.c
index 46ad0e9..7910a1a 100644
--- a/src/libostree/ostree-sysroot-cleanup.c
+++ b/src/libostree/ostree-sysroot-cleanup.c
@@ -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);
 
diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c
index 7a8af16..5e1ec44 100644
--- a/src/libostree/ostree-sysroot-deploy.c
+++ b/src/libostree/ostree-sysroot-deploy.c
@@ -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;
diff --git a/src/libostree/ostree-sysroot-upgrader.c b/src/libostree/ostree-sysroot-upgrader.c
index 9bcd711..eed779c 100644
--- a/src/libostree/ostree-sysroot-upgrader.c
+++ b/src/libostree/ostree-sysroot-upgrader.c
@@ -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,
diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c
index e6bc632..20573f8 100644
--- a/src/libostree/ostree-sysroot.c
+++ b/src/libostree/ostree-sysroot.c
@@ -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)
     {
diff --git a/src/ostree/ot-admin-builtin-cleanup.c b/src/ostree/ot-admin-builtin-cleanup.c
index 98baf86..4947861 100644
--- a/src/ostree/ot-admin-builtin-cleanup.c
+++ b/src/ostree/ot-admin-builtin-cleanup.c
@@ -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");
diff --git a/src/ostree/ot-admin-builtin-deploy.c b/src/ostree/ot-admin-builtin-deploy.c
index b2b24f0..6fc0deb 100644
--- a/src/ostree/ot-admin-builtin-deploy.c
+++ b/src/ostree/ot-admin-builtin-deploy.c
@@ -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;
 
diff --git a/src/ostree/ot-admin-builtin-diff.c b/src/ostree/ot-admin-builtin-diff.c
index 60bfcd3..cb45c80 100644
--- a/src/ostree/ot-admin-builtin-diff.c
+++ b/src/ostree/ot-admin-builtin-diff.c
@@ -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;
diff --git a/src/ostree/ot-admin-builtin-init-fs.c b/src/ostree/ot-admin-builtin-init-fs.c
index 943a68f..3385641 100644
--- a/src/ostree/ot-admin-builtin-init-fs.c
+++ b/src/ostree/ot-admin-builtin-init-fs.c
@@ -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"};
 
diff --git a/src/ostree/ot-admin-builtin-os-init.c b/src/ostree/ot-admin-builtin-os-init.c
index ee5c9dc..1c57517 100644
--- a/src/ostree/ot-admin-builtin-os-init.c
+++ b/src/ostree/ot-admin-builtin-os-init.c
@@ -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;
diff --git a/src/ostree/ot-admin-builtin-set-origin.c b/src/ostree/ot-admin-builtin-set-origin.c
index a3f071c..24a919f 100644
--- a/src/ostree/ot-admin-builtin-set-origin.c
+++ b/src/ostree/ot-admin-builtin-set-origin.c
@@ -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]");
diff --git a/src/ostree/ot-admin-builtin-status.c b/src/ostree/ot-admin-builtin-status.c
index 242a915..9dac4da 100644
--- a/src/ostree/ot-admin-builtin-status.c
+++ b/src/ostree/ot-admin-builtin-status.c
@@ -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;
diff --git a/src/ostree/ot-admin-builtin-switch.c b/src/ostree/ot-admin-builtin-switch.c
index db3d0c3..61793e5 100644
--- a/src/ostree/ot-admin-builtin-switch.c
+++ b/src/ostree/ot-admin-builtin-switch.c
@@ -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;
diff --git a/src/ostree/ot-admin-builtin-undeploy.c b/src/ostree/ot-admin-builtin-undeploy.c
index 3390ee9..39ae073 100644
--- a/src/ostree/ot-admin-builtin-undeploy.c
+++ b/src/ostree/ot-admin-builtin-undeploy.c
@@ -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");
 
diff --git a/src/ostree/ot-admin-builtin-upgrade.c b/src/ostree/ot-admin-builtin-upgrade.c
index 875f6fe..abf3759 100644
--- a/src/ostree/ot-admin-builtin-upgrade.c
+++ b/src/ostree/ot-admin-builtin-upgrade.c
@@ -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;
 
diff --git a/src/ostree/ot-admin-instutil-builtin-grub2-generate.c 
b/src/ostree/ot-admin-instutil-builtin-grub2-generate.c
index 7fd05b6..832ac06 100644
--- a/src/ostree/ot-admin-instutil-builtin-grub2-generate.c
+++ b/src/ostree/ot-admin-instutil-builtin-grub2-generate.c
@@ -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");
diff --git a/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c 
b/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c
index d1e80e9..471410c 100644
--- a/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c
+++ b/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c
@@ -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");
diff --git a/src/ostree/ot-admin-instutil-builtin-set-kargs.c 
b/src/ostree/ot-admin-instutil-builtin-set-kargs.c
index 9150a26..a985979 100644
--- a/src/ostree/ot-admin-instutil-builtin-set-kargs.c
+++ b/src/ostree/ot-admin-instutil-builtin-set-kargs.c
@@ -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");
diff --git a/src/ostree/ot-builtin-cat.c b/src/ostree/ot-builtin-cat.c
index f63ec5d..e258f3f 100644
--- a/src/ostree/ot-builtin-cat.c
+++ b/src/ostree/ot-builtin-cat.c
@@ -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;
diff --git a/src/ostree/ot-builtin-checkout.c b/src/ostree/ot-builtin-checkout.c
index a1ce316..9929a37 100644
--- a/src/ostree/ot-builtin-checkout.c
+++ b/src/ostree/ot-builtin-checkout.c
@@ -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;
diff --git a/src/ostree/ot-builtin-commit.c b/src/ostree/ot-builtin-commit.c
index 73885bc..f75def1 100644
--- a/src/ostree/ot-builtin-commit.c
+++ b/src/ostree/ot-builtin-commit.c
@@ -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;
diff --git a/src/ostree/ot-builtin-config.c b/src/ostree/ot-builtin-config.c
index 7590dc1..75ccbeb 100644
--- a/src/ostree/ot-builtin-config.c
+++ b/src/ostree/ot-builtin-config.c
@@ -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;
diff --git a/src/ostree/ot-builtin-diff.c b/src/ostree/ot-builtin-diff.c
index 11036e8..385d910 100644
--- a/src/ostree/ot-builtin-diff.c
+++ b/src/ostree/ot-builtin-diff.c
@@ -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;
diff --git a/src/ostree/ot-builtin-fsck.c b/src/ostree/ot-builtin-fsck.c
index 6ffe0e2..e13c1a8 100644
--- a/src/ostree/ot-builtin-fsck.c
+++ b/src/ostree/ot-builtin-fsck.c
@@ -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;
diff --git a/src/ostree/ot-builtin-gpg-sign.c b/src/ostree/ot-builtin-gpg-sign.c
index 93c78a4..d1f016d 100644
--- a/src/ostree/ot-builtin-gpg-sign.c
+++ b/src/ostree/ot-builtin-gpg-sign.c
@@ -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;
diff --git a/src/ostree/ot-builtin-init.c b/src/ostree/ot-builtin-init.c
index 9aceda5..05d64ac 100644
--- a/src/ostree/ot-builtin-init.c
+++ b/src/ostree/ot-builtin-init.c
@@ -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;
 
diff --git a/src/ostree/ot-builtin-log.c b/src/ostree/ot-builtin-log.c
index edc494e..e00ddd6 100644
--- a/src/ostree/ot-builtin-log.c
+++ b/src/ostree/ot-builtin-log.c
@@ -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;
diff --git a/src/ostree/ot-builtin-ls.c b/src/ostree/ot-builtin-ls.c
index 811abc2..ab63c8b 100644
--- a/src/ostree/ot-builtin-ls.c
+++ b/src/ostree/ot-builtin-ls.c
@@ -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;
diff --git a/src/ostree/ot-builtin-prune.c b/src/ostree/ot-builtin-prune.c
index 5bef209..5b6cb3b 100644
--- a/src/ostree/ot-builtin-prune.c
+++ b/src/ostree/ot-builtin-prune.c
@@ -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;
diff --git a/src/ostree/ot-builtin-pull-local.c b/src/ostree/ot-builtin-pull-local.c
index 40179f2..993c53e 100644
--- a/src/ostree/ot-builtin-pull-local.c
+++ b/src/ostree/ot-builtin-pull-local.c
@@ -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);
diff --git a/src/ostree/ot-builtin-pull.c b/src/ostree/ot-builtin-pull.c
index cb407a8..e19ef3c 100644
--- a/src/ostree/ot-builtin-pull.c
+++ b/src/ostree/ot-builtin-pull.c
@@ -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");
diff --git a/src/ostree/ot-builtin-refs.c b/src/ostree/ot-builtin-refs.c
index 2b57927..9587990 100644
--- a/src/ostree/ot-builtin-refs.c
+++ b/src/ostree/ot-builtin-refs.c
@@ -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;
diff --git a/src/ostree/ot-builtin-reset.c b/src/ostree/ot-builtin-reset.c
index 6300d16..eed44c0 100644
--- a/src/ostree/ot-builtin-reset.c
+++ b/src/ostree/ot-builtin-reset.c
@@ -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;
diff --git a/src/ostree/ot-builtin-rev-parse.c b/src/ostree/ot-builtin-rev-parse.c
index 9bd3aaa..fb68d4a 100644
--- a/src/ostree/ot-builtin-rev-parse.c
+++ b/src/ostree/ot-builtin-rev-parse.c
@@ -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;
diff --git a/src/ostree/ot-builtin-show.c b/src/ostree/ot-builtin-show.c
index c25e30b..421d770 100644
--- a/src/ostree/ot-builtin-show.c
+++ b/src/ostree/ot-builtin-show.c
@@ -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;
diff --git a/src/ostree/ot-builtin-static-delta.c b/src/ostree/ot-builtin-static-delta.c
index fba3d30..ad884e9 100644
--- a/src/ostree/ot-builtin-static-delta.c
+++ b/src/ostree/ot-builtin-static-delta.c
@@ -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;
 
diff --git a/src/ostree/ot-builtin-summary.c b/src/ostree/ot-builtin-summary.c
index 8156689..ed167b7 100644
--- a/src/ostree/ot-builtin-summary.c
+++ b/src/ostree/ot-builtin-summary.c
@@ -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");
 
diff --git a/src/ostree/ot-builtin-trivial-httpd.c b/src/ostree/ot-builtin-trivial-httpd.c
index cde4abb..7d437fb 100644
--- a/src/ostree/ot-builtin-trivial-httpd.c
+++ b/src/ostree/ot-builtin-trivial-httpd.c
@@ -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");
diff --git a/src/ostree/ot-editor.c b/src/ostree/ot-editor.c
index b81312f..2b2101f 100644
--- a/src/ostree/ot-editor.c
+++ b/src/ostree/ot-editor.c
@@ -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;
diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c
index 14e9aa0..f0fcace 100644
--- a/src/ostree/ot-main.c
+++ b/src/ostree/ot-main.c
@@ -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
diff --git a/tests/test-mutable-tree.c b/tests/test-mutable-tree.c
index d351f40..64d8d30 100644
--- a/tests/test-mutable-tree.c
+++ b/tests/test-mutable-tree.c
@@ -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));
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]