Lines Matching defs:state
32 * Save tty state and line discipline
40 bb_perror_msg_and_die("get state");
46 static int set_termios_state_and_warn(struct termios *state)
50 ret = tcsetattr(handle, TCSANOW, state);
52 bb_perror_msg("set state");
59 * Restore state and line discipline for ALL managed ttys
70 struct termios state;
78 memcpy(&state, &saved_state, sizeof(state));
79 cfsetispeed(&state, B0);
80 cfsetospeed(&state, B0);
81 if (set_termios_state_and_warn(&state))
95 * Set tty state, line discipline and encapsulation
97 static void set_state(struct termios *state, int encap)
102 if (set_termios_state_and_warn(state))
135 struct termios state;
193 /* Save current tty state */
197 memcpy(&state, &saved_state, sizeof(state));
199 memset(&state.c_cc, 0, sizeof(state.c_cc));
200 state.c_cc[VMIN] = 1;
201 state.c_iflag = IGNBRK | IGNPAR;
202 state.c_oflag = 0;
203 state.c_lflag = 0;
204 state.c_cflag = CS8 | HUPCL | CREAD
210 cfsetispeed(&state, baud_code);
211 cfsetospeed(&state, baud_code);
214 set_state(&state, encap);