summaryrefslogtreecommitdiff
path: root/support/support.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-07-26 14:47:35 +0200
committerFlorian Weimer <fweimer@redhat.com>2018-07-27 14:44:40 +0200
commit375076df4ac33a4015368a9d30fbcbdb6e2bd13f (patch)
treead6b876e23e0321314780d8c570f2612f1d8762a /support/support.h
parent20365a315b4e1aaa786e3b470a709b65406395e7 (diff)
downloadglibc-fw/holes.tar.gz
Avoid running some tests if the file system does not support holesfw/holes
Otherwise, these tests fills up the entire disk (or just run very slowly and eventually time out).
Diffstat (limited to 'support/support.h')
-rw-r--r--support/support.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/support/support.h b/support/support.h
index b61fe0735c..34ae6e10cd 100644
--- a/support/support.h
+++ b/support/support.h
@@ -65,6 +65,12 @@ void support_write_file_string (const char *path, const char *contents);
the result). */
char *support_quote_blob (const void *blob, size_t length);
+/* Returns non-zero if the file descriptor is a regular file on a file
+ system which supports holes (that is, seeking and writing does not
+ allocate storage for the range of zeros). FD must refer to a
+ regular file open for writing, and initially empty. */
+int support_descriptor_supports_holes (int fd);
+
/* Error-checking wrapper functions which terminate the process on
error. */