Skip to content
Snippets Groups Projects
Commit 8b75c8e3 authored by Colin Walters's avatar Colin Walters
Browse files

Remove glnx_stream_fstat()

There are only two users of this in ostree, and one of them is
fairly bogus; we can just use `fstat()`.
parent e30a773f
No related branches found
No related tags found
No related merge requests found
......@@ -1022,28 +1022,3 @@ glnx_file_replace_contents_with_perms_at (int dfd,
return TRUE;
}
/**
* glnx_stream_fstat:
* @stream: A stream containing a Unix file descriptor
* @stbuf: Memory location to write stat buffer
* @error:
*
* Some streams created via libgsystem are #GUnixInputStream; these do
* not support e.g. g_file_input_stream_query_info(). This function
* allows dropping to the raw unix fstat() call for these types of
* streams, while still conveniently wrapped with the normal GLib
* handling of @error.
*/
gboolean
glnx_stream_fstat (GFileDescriptorBased *stream,
struct stat *stbuf,
GError **error)
{
int fd = g_file_descriptor_based_get_fd (stream);
if (fstat (fd, stbuf) == -1)
return glnx_throw_errno_prefix (error, "fstat");
return TRUE;
}
......@@ -181,11 +181,6 @@ glnx_file_copy_at (int src_dfd,
GCancellable *cancellable,
GError **error);
gboolean
glnx_stream_fstat (GFileDescriptorBased *stream,
struct stat *stbuf,
GError **error);
int glnx_renameat2_noreplace (int olddirfd, const char *oldpath,
int newdirfd, const char *newpath);
int glnx_renameat2_exchange (int olddirfd, const char *oldpath,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment