summaryrefslogtreecommitdiffstats
path: root/src/fidentify.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-04-27 18:12:23 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-04-27 18:12:23 +0200
commita3d8937a1918db7ac21968f0729c54f582eec711 (patch)
tree970b2079bc9ca1bcfbd73c2f8d412b51fcc40e92 /src/fidentify.c
parentb40eee6a327a9474d4986cf723f236a8b556a60d (diff)
Use the correct value of errno to display a warning when log file creation failed
Diffstat (limited to 'src/fidentify.c')
-rw-r--r--src/fidentify.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fidentify.c b/src/fidentify.c
index 9dda2ff..56f642f 100644
--- a/src/fidentify.c
+++ b/src/fidentify.c
@@ -165,9 +165,10 @@ int main(int argc, char **argv)
int i;
unsigned int check=0;
FILE *log_handle=NULL;
+ int log_errno=0;
file_stat_t *file_stats;
log_set_levels(LOG_LEVEL_DEBUG|LOG_LEVEL_TRACE|LOG_LEVEL_QUIET|LOG_LEVEL_INFO|LOG_LEVEL_VERBOSE|LOG_LEVEL_PROGRESS|LOG_LEVEL_WARNING|LOG_LEVEL_ERROR|LOG_LEVEL_PERROR|LOG_LEVEL_CRITICAL);
- log_handle=log_open("fidentify.log", TD_LOG_CREATE);
+ log_handle=log_open("fidentify.log", TD_LOG_CREATE, &log_errno);
if(log_handle!=NULL)
{
time_t my_time;