summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-08-21 12:56:53 +0200
committerFlorian Weimer <fweimer@redhat.com>2018-08-21 12:56:53 +0200
commitaa42b3dbcb0326badf377fec2c7fb2f34fdabecd (patch)
tree818cd4e9c75b0dba8c982ce5d3b5def2d358ba05 /support/support.h
parentMakeconfig: Do not sort and deduplicate +cflags [BZ # 17248] (diff)
downloadglibc-aa42b3dbcb0326badf377fec2c7fb2f34fdabecd.tar.gz
glibc-aa42b3dbcb0326badf377fec2c7fb2f34fdabecd.tar.bz2
glibc-aa42b3dbcb0326badf377fec2c7fb2f34fdabecd.zip
Avoid running some tests if the file system does not support 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. */