stty: fix bug reported by Paul Albrecht <albrecht@rdi1.com> -
authorDenis Vlasenko <vda.linux@googlemail.com>
Fri, 12 Jan 2007 21:03:07 +0000 (21:03 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Fri, 12 Jan 2007 21:03:07 +0000 (21:03 -0000)
stty -echo didn't work. Introduced by me :(

coreutils/stty.c

index 93919b33afc61ef471f8d1928996487a34491fa3..c09c7c71fe89a8a2cd7682e8cd5a46acaefd126e 100644 (file)
@@ -1188,6 +1188,7 @@ end_option:
                        mp = find_mode(arg+1);
                        if (mp) {
                                set_mode(mp, 1 /* reversed */, &mode);
+                               require_set_attr = 1;
                        }
                        /* It is an option - already parsed. Skip it */
                        continue;
@@ -1196,6 +1197,7 @@ end_option:
                mp = find_mode(arg);
                if (mp) {
                        set_mode(mp, 0 /* non-reversed */, &mode);
+                       require_set_attr = 1;
                        continue;
                }
 
@@ -1203,6 +1205,7 @@ end_option:
                if (cp) {
                        ++k;
                        set_control_char_or_die(cp, argnext, &mode);
+                       require_set_attr = 1;
                        continue;
                }