File pacemaker-xml-no-error-if-output-file-isnt-syncable.patch of Package pacemaker.14737
commit 8c4d81a2a8fb9fc7db9d73a0482e81c64368ad28
Author: Ferenc Wágner <wferi@debian.org>
Date: Mon Nov 21 15:25:31 2016 +0100
Don't report error if the output file isn't syncable
diff --git a/lib/common/xml.c b/lib/common/xml.c
index 3bdc519d7..65237c880 100644
--- a/lib/common/xml.c
+++ b/lib/common/xml.c
@@ -3026,7 +3026,8 @@ write_xml_stream(xmlNode * xml_node, const char *filename, FILE * stream, gboole
res = -1;
}
- if (fsync(fileno(stream)) < 0) {
+ /* Don't report error if the file does not support synchronization */
+ if (fsync(fileno(stream)) < 0 && errno != EROFS && errno != EINVAL) {
crm_perror(LOG_ERR, "fsync for %s failed", filename);
res = -1;
}