summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2017-07-28 04:49:14 +0100
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2017-07-28 04:49:14 +0100
commit42b5e89f6e9fba17111f67441e25db38a737a3bd (patch)
tree00575dfc47116c9790cc885c0a43963b73934676 /src/core
parente08e2bd87aceafc2a34d72ca3fd362f2f2ea90eb (diff)
downloadirssi-42b5e89f6e9fba17111f67441e25db38a737a3bd.zip
Add missing diagnostics for rawlog open().
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/rawlog.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/rawlog.c b/src/core/rawlog.c
index 2192e256..d929682a 100644
--- a/src/core/rawlog.c
+++ b/src/core/rawlog.c
@@ -128,6 +128,9 @@ void rawlog_open(RAWLOG_REC *rawlog, const char *fname)
path = convert_home(fname);
rawlog->handle = open(path, O_WRONLY | O_APPEND | O_CREAT,
log_file_create_mode);
+ if (rawlog->handle == -1) {
+ g_warning("rawlog open() failed: %s", strerror(errno));
+ }
g_free(path);
rawlog_dump(rawlog, rawlog->handle);