summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 85cd3f3)
raw | patch | inline | side by side (parent: 85cd3f3)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 8 Mar 2009 11:12:41 +0000 (11:12 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 8 Mar 2009 11:12:41 +0000 (11:12 +0000) |
by Sebastian Harl
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1758 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1758 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_flush.c | patch | blob | history |
diff --git a/src/rrd_flush.c b/src/rrd_flush.c
index 2d8df3aeed16585305832ce75db0e65ca15735ff..1f72e80067ee050f6534ffffe80fb2502a81efbe 100644 (file)
--- a/src/rrd_flush.c
+++ b/src/rrd_flush.c
for (int i = optind; i < argc; i++)
{
status = rrdc_flush(argv[i]);
- if (status) break;
+ if (status)
+ {
+ char *error;
+ int remaining;
+
+ error = strdup(rrd_get_error());
+ remaining = argc - optind - 1;
+
+ rrd_set_error("Flushing of file \"%s\" failed: %s. Skipping "
+ "remaining %i file%s.", argv[i],
+ ((! error) || (*error == '\0')) ? "unknown error" : error,
+ remaining, (remaining == 1) ? "" : "s");
+ free(error);
+ break;
+ }
}
return ((status == 0) ? 0 : -1);