dovecot-2.2: file_preallocate() returned wrong value on success ...

dovecot at dovecot.org dovecot at dovecot.org
Fri Aug 10 05:24:40 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/4b0095f19181
changeset: 14780:4b0095f19181
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Jul 07 14:37:54 2012 +0300
description:
file_preallocate() returned wrong value on success with OSX.

diffstat:

 src/lib/file-set-size.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r ea18b2ddb67b -r 4b0095f19181 src/lib/file-set-size.c
--- a/src/lib/file-set-size.c	Sat Jul 07 05:51:37 2012 +0300
+++ b/src/lib/file-set-size.c	Sat Jul 07 14:37:54 2012 +0300
@@ -100,7 +100,7 @@
 	fs.fst_bytesalloc = 0;
 	if (fcntl(fd, F_PREALLOCATE, &fs) < 0)
 		return -1;
-	return 0;
+	return fs.fst_bytesalloc > 0 ? 1 : 0;
 #else
 	return 0;
 #endif


More information about the dovecot-cvs mailing list