libglnx porting: Migrate to glnx_stream_fstat()

I ended up deciding to move this one into libglnx, seems like
something other libglnx-using software might want to do, even though
xdg-app doesn't right now.

Closes: #282
Approved by: jlebon
This commit is contained in:
Colin Walters authored and Colin Walters (automation) committed 2016-05-06 14:29:59 +00:00
1 parent 5a90781cd8
commit 6724519080
4 files changed
+6 -6

No files matched your search

+1 -1
Submodule libglnx updated: 47ddbfa563...3d162e772d.
+1 -1
View File
@@ -613,7 +613,7 @@ ostree_content_file_parse_at (gboolean compressed,
cancellable, error))
goto out;
if (!gs_stream_fstat ((GFileDescriptorBased*)file_input, &stbuf, cancellable, error))
if (!glnx_stream_fstat ((GFileDescriptorBased*)file_input, &stbuf, error))
goto out;
if (!ostree_content_stream_parse (compressed, file_input, stbuf.st_size, trusted,
+1 -1
View File
@@ -1067,7 +1067,7 @@ _ostree_fetcher_bytes_transferred (OstreeFetcher *self)
if (G_IS_FILE_DESCRIPTOR_BASED (stream))
{
if (gs_stream_fstat ((GFileDescriptorBased*)stream, &stbuf, NULL, NULL))
if (glnx_stream_fstat ((GFileDescriptorBased*)stream, &stbuf, NULL))
ret += stbuf.st_size;
}
}
+3 -3
View File
@@ -2925,7 +2925,7 @@ load_metadata_internal (OstreeRepo *self,
{
struct stat stbuf;
if (!gs_stream_fstat ((GFileDescriptorBased*)ret_stream, &stbuf, cancellable, error))
if (!glnx_stream_fstat ((GFileDescriptorBased*)ret_stream, &stbuf, error))
goto out;
*out_size = stbuf.st_size;
}
@@ -3100,8 +3100,8 @@ ostree_repo_load_file (OstreeRepo *self,
tmp_stream = g_unix_input_stream_new (fd, TRUE);
fd = -1; /* Transfer ownership */
if (!gs_stream_fstat ((GFileDescriptorBased*) tmp_stream, &stbuf,
cancellable, error))
if (!glnx_stream_fstat ((GFileDescriptorBased*) tmp_stream, &stbuf,
error))
goto out;
if (!ostree_content_stream_parse (TRUE, tmp_stream, stbuf.st_size, TRUE,