if (!glnx_fstat (fd, &stbuf, error))
return FALSE;
- g_autoptr(GInputStream) file_input = g_unix_input_stream_new (glnx_steal_fd (&fd), TRUE);
+ g_autoptr(GInputStream) file_input = g_unix_input_stream_new (g_steal_fd (&fd), TRUE);
g_autoptr(GFileInfo) ret_file_info = NULL;
g_autoptr(GVariant) ret_xattrs = NULL;
glnx_autofd int fd = -1;
if (!glnx_openat_rdonly (dfd, path, FALSE, &fd, error))
return FALSE;
- in = g_unix_input_stream_new (glnx_steal_fd (&fd), TRUE);
+ in = g_unix_input_stream_new (g_steal_fd (&fd), TRUE);
if (canonicalize_perms)
{
g_file_info_set_attribute_uint32 (file_info, "unix::uid", 0);
if (!glnx_fstat (tmpf.fd, &stbuf, error))
goto out;
/* Non-mirroring path */
- tmpf_input = g_unix_input_stream_new (glnx_steal_fd (&tmpf.fd), TRUE);
+ tmpf_input = g_unix_input_stream_new (g_steal_fd (&tmpf.fd), TRUE);
/* If it appears corrupted, we'll delete it below */
if (!ostree_content_stream_parse (TRUE, tmpf_input, stbuf.st_size, FALSE,
goto out;
/* Transfer ownership of the fd */
- in = g_unix_input_stream_new (glnx_steal_fd (&tmpf.fd), TRUE);
+ in = g_unix_input_stream_new (g_steal_fd (&tmpf.fd), TRUE);
/* TODO - make async */
if (!_ostree_static_delta_part_open (in, NULL, 0, fetch_data->expected_checksum,
GError **error)
{
g_autoptr(OstreeRepo) repo = g_object_new (OSTREE_TYPE_REPO, NULL);
- repo->repo_dir_fd = glnx_steal_fd (dfd);
+ repo->repo_dir_fd = g_steal_fd (dfd);
if (!ostree_repo_open (repo, cancellable, error))
return NULL;
return FALSE;
/* Note early return */
- *out_dfd = glnx_steal_fd (&repo_dfd);
+ *out_dfd = g_steal_fd (&repo_dfd);
return TRUE;
}
}
return FALSE;
}
- *out_dfd = glnx_steal_fd (&repo_dfd);
+ *out_dfd = g_steal_fd (&repo_dfd);
return TRUE;
}
&repo_dir_fd,
cancellable, error))
return FALSE;
- self->repo_dir_fd = glnx_steal_fd (&repo_dir_fd);
+ self->repo_dir_fd = g_steal_fd (&repo_dir_fd);
if (!ostree_repo_open (self, cancellable, error))
return FALSE;
return TRUE;
return FALSE;
glnx_close_fd (&self->cache_dir_fd);
- self->cache_dir_fd = glnx_steal_fd (&fd);
+ self->cache_dir_fd = g_steal_fd (&fd);
return TRUE;
}
if (!glnx_fstat (fd, &stbuf, error))
return FALSE;
- g_autoptr(GInputStream) tmp_stream = g_unix_input_stream_new (glnx_steal_fd (&fd), TRUE);
+ g_autoptr(GInputStream) tmp_stream = g_unix_input_stream_new (g_steal_fd (&fd), TRUE);
/* Note return here */
return ostree_content_stream_parse (TRUE, tmp_stream, stbuf.st_size, TRUE,
out_input, out_file_info, out_xattrs,
}
if (out_fd)
- *out_fd = glnx_steal_fd (&fd);
+ *out_fd = g_steal_fd (&fd);
if (out_stbuf)
*out_stbuf = stbuf;
ot_transfer_out_value (out_symlink, &ret_symlink);
if (out_input)
{
if (fd != -1)
- *out_input = g_unix_input_stream_new (glnx_steal_fd (&fd), TRUE);
+ *out_input = g_unix_input_stream_new (g_steal_fd (&fd), TRUE);
else
*out_input = NULL;
}
g_debug ("Reusing tmpdir %s", dent->d_name);
reusing_dir = TRUE;
ret_tmpdir.src_dfd = tmpdir_dfd;
- ret_tmpdir.fd = glnx_steal_fd (&target_dfd);
+ ret_tmpdir.fd = g_steal_fd (&target_dfd);
ret_tmpdir.path = g_strdup (dent->d_name);
ret_tmpdir.initialized = TRUE;
}
return FALSE;
if (fd != -1)
{
- g_autoptr(GInputStream) in = g_unix_input_stream_new (glnx_steal_fd (&fd), TRUE);
+ g_autoptr(GInputStream) in = g_unix_input_stream_new (g_steal_fd (&fd), TRUE);
if (!ot_gio_splice_update_checksum (NULL, in, checksum, cancellable, error))
return FALSE;
}
return FALSE;
if (out_dfd)
- *out_dfd = glnx_steal_fd (&target_dfd);
+ *out_dfd = g_steal_fd (&target_dfd);
return TRUE;
}
glnx_autofd int fd = -1;
if (!glnx_openat_rdonly (dfd, path, follow, &fd, error))
return FALSE;
- *out_istream = g_unix_input_stream_new (glnx_steal_fd (&fd), TRUE);
+ *out_istream = g_unix_input_stream_new (g_steal_fd (&fd), TRUE);
return TRUE;
}
g_clear_error (&error);
g_assert_no_error (error);
- *out_repos_dfd = glnx_steal_fd (&repos_dfd);
+ *out_repos_dfd = g_steal_fd (&repos_dfd);
g_autoptr(GFile) mount_root = g_file_get_child (fixture->working_dir, mount_root_name);
*out_mount = G_MOUNT (ostree_mock_mount_new (mount_root_name, mount_root));