diff --git a/glnx-fdio.c b/glnx-fdio.c index ffe5400d179914e96218a26c5d6b224a94f233ab..797d939c27d6811fdb7bcb459d86c94f43a2c2bd 100644 --- a/glnx-fdio.c +++ b/glnx-fdio.c @@ -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; -} diff --git a/glnx-fdio.h b/glnx-fdio.h index 150b22e3e22bb769ab85f7261621dfad8ad809bd..601e7936d9a0b03978ecb017b8d66347c95feb83 100644 --- a/glnx-fdio.h +++ b/glnx-fdio.h @@ -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,