summaryrefslogtreecommitdiff
path: root/src/core/rawlog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/rawlog.c')
-rw-r--r--src/core/rawlog.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/rawlog.c b/src/core/rawlog.c
index 20368aeb..e66f20dd 100644
--- a/src/core/rawlog.c
+++ b/src/core/rawlog.c
@@ -102,10 +102,15 @@ void rawlog_redirect(RAWLOG_REC *rawlog, const char *str)
static void rawlog_dump(RAWLOG_REC *rawlog, int f)
{
GSList *tmp;
+ ssize_t ret = 1;
- for (tmp = rawlog->lines; tmp != NULL; tmp = tmp->next) {
- write(f, tmp->data, strlen((char *) tmp->data));
- write(f, "\n", 1);
+ for (tmp = rawlog->lines; ret && tmp != NULL; tmp = tmp->next) {
+ ret = write(f, tmp->data, strlen((char *) tmp->data));
+ ret &= write(f, "\n", 1);
+ }
+
+ if (ret <= 0) {
+ g_warning("rawlog write() failed: %s", strerror(errno));
}
}