From: Timo Sirainen Date: Wed, 18 Aug 2010 15:21:04 +0000 (+0100) Subject: lib-index: Put all syscall error logging through one function. X-Git-Tag: 2.0.1~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=613dee7396edc63ccc64e7cc17df6fcabb1304b9;p=thirdparty%2Fdovecot%2Fcore.git lib-index: Put all syscall error logging through one function. --- diff --git a/src/lib-index/mail-index.c b/src/lib-index/mail-index.c index 9b56a274ac..9adce5b9a2 100644 --- a/src/lib-index/mail-index.c +++ b/src/lib-index/mail-index.c @@ -812,16 +812,8 @@ void mail_index_fchown(struct mail_index *index, int fd, const char *path) int mail_index_set_syscall_error(struct mail_index *index, const char *function) { - i_assert(function != NULL); - - if (ENOSPACE(errno)) { - index->nodiskspace = TRUE; - if ((index->flags & MAIL_INDEX_OPEN_FLAG_NEVER_IN_MEMORY) == 0) - return -1; - } - - return mail_index_set_error(index, "%s failed with index file %s: %m", - function, index->filepath); + return mail_index_file_set_syscall_error(index, index->filepath, + function); } int mail_index_file_set_syscall_error(struct mail_index *index,