Commit 29097215 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Remove the 80% file system free space check

This check never worked as intended for several reasons:

- Didn't take the existing file size into account, causing it to
  succeed on first startup but fail on next

- Sparse files were not handled, and can't be handled as we don't know
  where in the file a hole could be and whether truncation actually
  would change the number of blocks used at all

Fixes: #1343
parent 44a996f4
......@@ -223,11 +223,6 @@ STV_FileSize(int fd, const char *size, unsigned *granularity, const char *ctx)
if (i)
fprintf(stderr, "WARNING: (%s) file size reduced"
" to %ju due to system \"off_t\" limitations\n", ctx, l);
else if (l - st.st_size > fssize) {
l = fssize * 80 / 100;
fprintf(stderr, "WARNING: (%s) file size reduced"
" to %ju (80%% of available disk space)\n", ctx, l);
}
if (sizeof(void *) == 4 && l > INT32_MAX) { /*lint !e506 !e774 !e845 */
fprintf(stderr,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment