int ret;
#ifdef HAVE_MMAP
+ ret = msync(rrd_file->file_start, rrd_file->file_len,MS_ASYNC);
+ if (ret != 0)
+ rrd_set_error("msync rrd_file: %s", rrd_strerror(errno));
ret = munmap(rrd_file->file_start, rrd_file->file_len);
if (ret != 0)
rrd_set_error("munmap rrd_file: %s", rrd_strerror(errno));
if (count == 0)
return 0;
if (buf == NULL)
- return -1 /* EINVAL */
+ return -1; /* EINVAL */
memcpy(rrd_file->file_start + rrd_file->pos, buf, count);
rrd_file->pos += count;
return count; /* mimmic write() semantics */