diff options
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h index 165b84334..c4fcc80f4 100644 --- a/src/util.h +++ b/src/util.h @@ -241,4 +241,13 @@ gboolean rspamd_strtol (const gchar *s, gsize len, glong *value); */ gboolean rspamd_strtoul (const gchar *s, gsize len, gulong *value); +/** + * Try to allocate a file on filesystem (using fallocate or posix_fallocate) + * @param fd descriptor + * @param offset offset of file + * @param len length to allocate + * @return -1 in case of failure + */ +gint rspamd_fallocate (gint fd, off_t offset, off_t len); + #endif |