projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow to the the smoothing window size other thatn the default 5%.
[rrdtool.git]
/
src
/
rrd_open.c
diff --git
a/src/rrd_open.c
b/src/rrd_open.c
index
b9885aa
..
70e0ab9
100644
(file)
--- a/
src/rrd_open.c
+++ b/
src/rrd_open.c
@@
-381,6
+381,9
@@
int rrd_close(
int ret;
#ifdef HAVE_MMAP
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));
ret = munmap(rrd_file->file_start, rrd_file->file_len);
if (ret != 0)
rrd_set_error("munmap rrd_file: %s", rrd_strerror(errno));
@@
-480,7
+483,7
@@
inline ssize_t rrd_write(
if (count == 0)
return 0;
if (buf == NULL)
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 */
memcpy(rrd_file->file_start + rrd_file->pos, buf, count);
rrd_file->pos += count;
return count; /* mimmic write() semantics */