if ((size > cache->mmap_length || offset + size > cache->mmap_length) &&
(offset > 0 || size > sizeof(struct mail_cache_header))) {
if (fstat(cache->fd, &st) < 0) {
- i_error("fstat(%s) failed: %m", cache->filepath);
+ e_error(cache->index->event,
+ "fstat(%s) failed: %m", cache->filepath);
return -1;
}
cache->last_stat_size = st.st_size;
if (errno == ENOENT) {
/* it'll be created later */
} else if (errno == EACCES) {
- i_error("%s", eacces_error_get("stat", index_dir));
+ e_error(parent_event, "%s",
+ eacces_error_get("stat", index_dir));
} else {
- i_error("stat(%s) failed: %m", index_dir);
+ e_error(parent_event, "stat(%s) failed: %m", index_dir);
}
}
if (stat(index->dir, &st) < 0) {
if (errno != ENOENT)
- i_error("stat(%s) failed: %m", index->dir);
+ e_error(index->event, "stat(%s) failed: %m", index->dir);
return FALSE;
}