summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-01-04 19:10:56 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-01-04 19:10:56 (GMT)
commitb25ed9dfb2d7c5c4e39b7d26ef033e6744022f00 (patch)
tree6ae74c7139359b02adab9b0cec98154b3961b8e3 /src
parente6e6479710b0a00218437753cf816bf68c99f8ab (diff)
Replaced calls to perror() by logging when loading file contents.
Diffstat (limited to 'src')
-rw-r--r--src/analysis/contents/file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/analysis/contents/file.c b/src/analysis/contents/file.c
index 6b55840..5beb0e3 100644
--- a/src/analysis/contents/file.c
+++ b/src/analysis/contents/file.c
@@ -35,6 +35,7 @@
#include "../content-int.h"
#include "../../common/extstr.h"
#include "../../common/pathname.h"
+#include "../../core/logs.h"
@@ -285,7 +286,7 @@ GBinContent *g_file_content_new(const char *filename)
fd = open(filename, O_RDONLY);
if (fd == -1)
{
- perror("open");
+ LOG_ERROR_N("open");
goto gbcnff_error;
}
@@ -293,7 +294,7 @@ GBinContent *g_file_content_new(const char *filename)
if (ret == -1)
{
close(fd);
- perror("fstat");
+ LOG_ERROR_N("fstat");
goto gbcnff_error;
}
@@ -301,7 +302,7 @@ GBinContent *g_file_content_new(const char *filename)
if (content == MAP_FAILED)
{
close(fd);
- perror("mmap");
+ LOG_ERROR_N("mmap");
goto gbcnff_error;
}