summaryrefslogtreecommitdiff
path: root/src/nmcli/nmcli.c
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2022-02-16 12:10:28 +0100
committerLubomir Rintel <lkundrak@v3.sk>2022-02-16 12:15:50 +0100
commitbec857cc17f5cc1f0aa97b2695bab5b94337263e (patch)
treeb7c0cd0aa27877ebe8c4308ed6981b8b1a777307 /src/nmcli/nmcli.c
parent365d0e49bc4feb7a5532c8a0bc37121e7e0aac2e (diff)
downloadNetworkManager-bec857cc17f5cc1f0aa97b2695bab5b94337263e.tar.gz
nmcli: do not save/restore terminal attrslr/no-tcsetattr
This is vestigal. It has been in place, because we'd be turning off echo ourselves when asking for password and needed to make sure we'd still terminal in original state upon unexpected termination. This shouldn't be necessary since commit 9d95e1f1753a ('clients/cli: use a nicer password prompt') we let readline take care of this and also clean up after itself in nmc_cleanup_readline().
Diffstat (limited to 'src/nmcli/nmcli.c')
-rw-r--r--src/nmcli/nmcli.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/nmcli/nmcli.c b/src/nmcli/nmcli.c
index fae4058490..1df7cfb3ba 100644
--- a/src/nmcli/nmcli.c
+++ b/src/nmcli/nmcli.c
@@ -11,7 +11,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
-#include <termios.h>
#include <unistd.h>
#include <locale.h>
#if HAVE_EDITLINE_READLINE
@@ -119,7 +118,6 @@ typedef struct {
/* --- Global variables --- */
GMainLoop *loop = NULL;
-struct termios termios_orig;
NM_CACHED_QUARK_FCN("nmcli-error-quark", nmcli_error_quark);
@@ -935,7 +933,6 @@ nmc_clear_sigint(void)
void
nmc_exit(void)
{
- tcsetattr(STDIN_FILENO, TCSADRAIN, &termios_orig);
nmc_cleanup_readline();
exit(1);
}
@@ -1026,9 +1023,6 @@ main(int argc, char *argv[])
textdomain(GETTEXT_PACKAGE);
#endif
- /* Save terminal settings */
- tcgetattr(STDIN_FILENO, &termios_orig);
-
nm_cli.return_text = g_string_new(_("Success"));
loop = g_main_loop_new(NULL, FALSE);