diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -382,7 +382,12 @@ main(int ac, char **av) | |||
382 | } | 382 | } |
383 | break; | 383 | break; |
384 | case 'q': | 384 | case 'q': |
385 | options.log_level = SYSLOG_LEVEL_QUIET; | 385 | if (options.log_level == SYSLOG_LEVEL_QUIET) { |
386 | options.log_level = SYSLOG_LEVEL_SILENT; | ||
387 | } | ||
388 | else if (options.log_level != SYSLOG_LEVEL_SILENT) { | ||
389 | options.log_level = SYSLOG_LEVEL_QUIET; | ||
390 | } | ||
386 | break; | 391 | break; |
387 | case 'e': | 392 | case 'e': |
388 | if (optarg[0] == '^' && optarg[2] == 0 && | 393 | if (optarg[0] == '^' && optarg[2] == 0 && |
@@ -598,7 +603,7 @@ main(int ac, char **av) | |||
598 | tty_flag = 0; | 603 | tty_flag = 0; |
599 | /* Do not allocate a tty if stdin is not a tty. */ | 604 | /* Do not allocate a tty if stdin is not a tty. */ |
600 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { | 605 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { |
601 | if (tty_flag) | 606 | if (tty_flag && options.log_level > SYSLOG_LEVEL_QUIET) |
602 | logit("Pseudo-terminal will not be allocated because stdin is not a terminal."); | 607 | logit("Pseudo-terminal will not be allocated because stdin is not a terminal."); |
603 | tty_flag = 0; | 608 | tty_flag = 0; |
604 | } | 609 | } |
@@ -1482,7 +1487,7 @@ control_client(const char *path) | |||
1482 | } else | 1487 | } else |
1483 | debug2("Received exit status from master %d", exitval[0]); | 1488 | debug2("Received exit status from master %d", exitval[0]); |
1484 | 1489 | ||
1485 | if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) | 1490 | if (tty_flag && options.log_level > SYSLOG_LEVEL_QUIET) |
1486 | fprintf(stderr, "Shared connection to %s closed.\r\n", host); | 1491 | fprintf(stderr, "Shared connection to %s closed.\r\n", host); |
1487 | 1492 | ||
1488 | exit(exitval[0]); | 1493 | exit(exitval[0]); |