diff options
author | Florian Weimer <fweimer@redhat.com> | 2018-08-21 12:56:53 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2018-08-21 12:56:53 +0200 |
commit | aa42b3dbcb0326badf377fec2c7fb2f34fdabecd (patch) | |
tree | 818cd4e9c75b0dba8c982ce5d3b5def2d358ba05 /support/support.h | |
parent | c7627f41baaeb7f1a7b73ff66ef48eaafc1990f6 (diff) | |
download | glibc-aa42b3dbcb0326badf377fec2c7fb2f34fdabecd.tar.gz glibc-aa42b3dbcb0326badf377fec2c7fb2f34fdabecd.tar.xz 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.h | 6 |
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. */ |