summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2017-07-11 10:30:05 -0400
committerColin Walters <walters@verbum.org>2017-07-17 12:12:14 -0400
commit8b75c8e341279032e34a1d496b2181362db3e6b8 (patch)
tree8078bb3fc37605219ecfb1c4bcac11b5eaefd728
parente30a773f2ca45ed7c0654a7c0b2a6449d3de9af0 (diff)
downloadlibglnx-8b75c8e341279032e34a1d496b2181362db3e6b8.tar.gz
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()`.
-rw-r--r--glnx-fdio.c25
-rw-r--r--glnx-fdio.h5
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,