summaryrefslogtreecommitdiff
path: root/monitor/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor/main.c')
-rw-r--r--monitor/main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/monitor/main.c b/monitor/main.c
index c9041663e..f9bca221a 100644
--- a/monitor/main.c
+++ b/monitor/main.c
@@ -229,13 +229,10 @@ int main(int argc, char *argv[])
if (ellisys_server)
ellisys_enable(ellisys_server, ellisys_port);
- if (tty && control_tty(tty, tty_speed) < 0)
+ if (!tty && control_tracing() < 0)
return EXIT_FAILURE;
- /* Accept error here if we have a successfully opened TTY
- * (could happen if btmon is run as a normal user).
- */
- if (control_tracing() < 0 && !tty)
+ if (tty && control_tty(tty, tty_speed) < 0)
return EXIT_FAILURE;
exit_status = mainloop_run();