dovecot-1.2: AIX: Silently ignore posix_fallocate() failures.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Sep 22 21:23:40 EEST 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/2442529e4cec
changeset: 8207:2442529e4cec
user: Timo Sirainen <tss at iki.fi>
date: Mon Sep 22 21:23:37 2008 +0300
description:
AIX: Silently ignore posix_fallocate() failures.
diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
src/lib/file-set-size.c | 6 +++---
diffs (20 lines):
diff -r 53ad035a2d0b -r 2442529e4cec src/lib/file-set-size.c
--- a/src/lib/file-set-size.c Mon Sep 22 21:08:26 2008 +0300
+++ b/src/lib/file-set-size.c Mon Sep 22 21:23:37 2008 +0300
@@ -46,13 +46,13 @@ int file_set_size(int fd, off_t size)
if (posix_fallocate(fd, st.st_size, size - st.st_size) == 0)
return 0;
- if (errno != EINVAL) {
+ if (errno != EINVAL /* Solaris */ &&
+ errno != ENOPROTOOPT /* AIX */) {
if (!ENOSPACE(errno))
i_error("posix_fallocate() failed: %m");
return -1;
}
- /* Solaris seems to fail with EINVAL if it's not supported
- by the kernel. Fallback to writing. */
+ /* Not supported by kernel, fallback to writing. */
posix_fallocate_supported = FALSE;
}
#endif
More information about the dovecot-cvs
mailing list