From bec857cc17f5cc1f0aa97b2695bab5b94337263e Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Wed, 16 Feb 2022 12:10:28 +0100 Subject: nmcli: do not save/restore terminal attrs 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(). --- src/nmcli/nmcli.c | 6 ------ 1 file changed, 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 #include #include -#include #include #include #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); -- cgit v1.2.1