|
|
60de42 |
From ffba43cf28cecf1860242dc7cce2e14ba4288a10 Mon Sep 17 00:00:00 2001
|
|
|
60de42 |
From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= <wferi@debian.org>
|
|
|
60de42 |
Date: Mon, 21 Nov 2016 15:20:35 +0100
|
|
|
60de42 |
Subject: [PATCH 1/2] crm_perror appends a colon to its fmt argument
|
|
|
60de42 |
|
|
|
60de42 |
---
|
|
|
60de42 |
lib/common/strings.c | 2 +-
|
|
|
60de42 |
lib/common/xml.c | 4 ++--
|
|
|
60de42 |
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
60de42 |
|
|
|
60de42 |
diff --git a/lib/common/strings.c b/lib/common/strings.c
|
|
|
60de42 |
index 67cee12..298a237 100644
|
|
|
60de42 |
--- a/lib/common/strings.c
|
|
|
60de42 |
+++ b/lib/common/strings.c
|
|
|
60de42 |
@@ -109,7 +109,7 @@ crm_int_helper(const char *text, char **end_text)
|
|
|
60de42 |
crm_err("Conversion of %s was clipped: %lld", text, result);
|
|
|
60de42 |
|
|
|
60de42 |
} else if (errno != 0) {
|
|
|
60de42 |
- crm_perror(LOG_ERR, "Conversion of %s failed:", text);
|
|
|
60de42 |
+ crm_perror(LOG_ERR, "Conversion of %s failed", text);
|
|
|
60de42 |
}
|
|
|
60de42 |
|
|
|
60de42 |
if (local_end_text != NULL && local_end_text[0] != '\0') {
|
|
|
60de42 |
diff --git a/lib/common/xml.c b/lib/common/xml.c
|
|
|
60de42 |
index a6a6d0a..3bdc519 100644
|
|
|
60de42 |
--- a/lib/common/xml.c
|
|
|
60de42 |
+++ b/lib/common/xml.c
|
|
|
60de42 |
@@ -3022,12 +3022,12 @@ write_xml_stream(xmlNode * xml_node, const char *filename, FILE * stream, gboole
|
|
|
60de42 |
bail:
|
|
|
60de42 |
|
|
|
60de42 |
if (fflush(stream) != 0) {
|
|
|
60de42 |
- crm_perror(LOG_ERR, "fflush for %s failed:", filename);
|
|
|
60de42 |
+ crm_perror(LOG_ERR, "fflush for %s failed", filename);
|
|
|
60de42 |
res = -1;
|
|
|
60de42 |
}
|
|
|
60de42 |
|
|
|
60de42 |
if (fsync(fileno(stream)) < 0) {
|
|
|
60de42 |
- crm_perror(LOG_ERR, "fsync for %s failed:", filename);
|
|
|
60de42 |
+ crm_perror(LOG_ERR, "fsync for %s failed", filename);
|
|
|
60de42 |
res = -1;
|
|
|
60de42 |
}
|
|
|
60de42 |
|
|
|
60de42 |
--
|
|
|
60de42 |
1.8.3.1
|
|
|
60de42 |
|
|
|
60de42 |
|
|
|
60de42 |
From 8c4d81a2a8fb9fc7db9d73a0482e81c64368ad28 Mon Sep 17 00:00:00 2001
|
|
|
60de42 |
From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= <wferi@debian.org>
|
|
|
60de42 |
Date: Mon, 21 Nov 2016 15:25:31 +0100
|
|
|
60de42 |
Subject: [PATCH 2/2] Don't report error if the output file isn't syncable
|
|
|
60de42 |
|
|
|
60de42 |
---
|
|
|
60de42 |
lib/common/xml.c | 3 ++-
|
|
|
60de42 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
60de42 |
|
|
|
60de42 |
diff --git a/lib/common/xml.c b/lib/common/xml.c
|
|
|
60de42 |
index 3bdc519..65237c8 100644
|
|
|
60de42 |
--- a/lib/common/xml.c
|
|
|
60de42 |
+++ b/lib/common/xml.c
|
|
|
60de42 |
@@ -3026,7 +3026,8 @@ write_xml_stream(xmlNode * xml_node, const char *filename, FILE * stream, gboole
|
|
|
60de42 |
res = -1;
|
|
|
60de42 |
}
|
|
|
60de42 |
|
|
|
60de42 |
- if (fsync(fileno(stream)) < 0) {
|
|
|
60de42 |
+ /* Don't report error if the file does not support synchronization */
|
|
|
60de42 |
+ if (fsync(fileno(stream)) < 0 && errno != EROFS && errno != EINVAL) {
|
|
|
60de42 |
crm_perror(LOG_ERR, "fsync for %s failed", filename);
|
|
|
60de42 |
res = -1;
|
|
|
60de42 |
}
|
|
|
60de42 |
--
|
|
|
60de42 |
1.8.3.1
|
|
|
60de42 |
|