---
conf.c | 6 +++---
passt.c | 2 +-
passt.h | 4 ++--
util.h | 14 ++++++++++++++
4 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/conf.c b/conf.c
index 0e512f4..c1dd9ba 100644
--- a/conf.c
+++ b/conf.c
@@ -1305,13 +1305,13 @@ void conf(struct ctx *c, int argc, char **argv)
if (logfile)
die("Can't log to both file and stderr");
- if (c->stderr)
+ if (c->force_stderr)
die("Multiple --stderr options given");
- c->stderr = 1;
+ c->force_stderr = 1;
break;
case 'l':
- if (c->stderr)
+ if (c->force_stderr)
die("Can't log to both stderr and file");
if (logfile)
diff --git a/passt.c b/passt.c
index 5b8146e..f67213a 100644
--- a/passt.c
+++ b/passt.c
@@ -241,7 +241,7 @@ int main(int argc, char **argv)
conf(&c, argc, argv);
trace_init(c.trace);
- if (c.stderr || isatty(fileno(stdout)))
+ if (c.force_stderr || isatty(fileno(stdout)))
__openlog(log_name, LOG_PERROR, LOG_DAEMON);
quit_fd = pasta_netns_quit_init(&c);
diff --git a/passt.h b/passt.h
index e0383eb..71d3602 100644
--- a/passt.h
+++ b/passt.h
@@ -32,7 +32,7 @@ struct tap_l4_msg {
union epoll_ref;
#include