summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 70582a0)
raw | patch | inline | side by side (parent: 70582a0)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 7 Jun 2009 14:27:52 +0000 (14:27 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 7 Jun 2009 14:27:52 +0000 (14:27 +0000) |
program/src/rrd_open.c | patch | blob | history |
diff --git a/program/src/rrd_open.c b/program/src/rrd_open.c
index d09f640daa681c1f2075e4481a54ff6f1b1fc8dd..03cc5b9a1bdf09299d71f60bea509e62da68a97b 100644 (file)
--- a/program/src/rrd_open.c
+++ b/program/src/rrd_open.c
} else {
rrd_file->file_len = newfile_size;
lseek(rrd_simple_file->fd, newfile_size - 1, SEEK_SET);
- write(rrd_simple_file->fd, "\0", 1); /* poke */
+ if ( write(rrd_simple_file->fd, "\0", 1) == -1){ /* poke */
+ rrd_set_error("write '%s': %s", file_name, rrd_strerror(errno));
+ goto out_close;
+ }
lseek(rrd_simple_file->fd, 0, SEEK_SET);
}
#ifdef HAVE_POSIX_FADVISE