[libglnx] Remove glnx_stream_fstat()



commit 8b75c8e341279032e34a1d496b2181362db3e6b8
Author: Colin Walters <walters verbum org>
Date:   Tue Jul 11 10:30:05 2017 -0400

    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()`.

 glnx-fdio.c |   25 -------------------------
 glnx-fdio.h |    5 -----
 2 files changed, 0 insertions(+), 30 deletions(-)
---
diff --git a/glnx-fdio.c b/glnx-fdio.c
index ffe5400..797d939 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 150b22e..601e793 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,


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