summaryrefslogtreecommitdiff
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 16:23:43 +0100
commit3b9e612dab2a8089145e61f6166a23cf35bae124 (patch)
tree1ec8d01ae4267b22b3bc7e6116717047f17ec799
parent8fc9f818b875772e0352d1da8e45061f6d837513 (diff)
downloadNetworkManager-3b9e612dab2a8089145e61f6166a23cf35bae124.tar.gz
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(). https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1100
-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);