summaryrefslogtreecommitdiffstats
path: root/src/intrfn.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/intrfn.c
parentb40eee6a327a9474d4986cf723f236a8b556a60d (diff)
Use the correct value of errno to display a warning when log file creation failed
Diffstat (limited to 'src/intrfn.c')
-rw-r--r--src/intrfn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intrfn.c b/src/intrfn.c
index 9929bb1..26a77bb 100644
--- a/src/intrfn.c
+++ b/src/intrfn.c
@@ -1245,14 +1245,14 @@ int end_ncurses(void)
return 0;
}
-char *ask_log_location(const char*filename)
+char *ask_log_location(const char*filename, const int errsv)
{
static char response[128];
aff_copy(stdscr);
if(filename!=NULL)
{
wmove(stdscr,6,0);
- wprintw(stdscr,"Cannot open %s: %s\n",filename, strerror(errno));
+ wprintw(stdscr,"Cannot open %s: %s\n",filename, strerror(errsv));
}
wmove(stdscr,8,0);
wprintw(stdscr,"Please enter the full log filename or press ");