aboutsummaryrefslogtreecommitdiff
path: root/init/init.c
diff options
context:
space:
mode:
authoraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-05-29 12:57:52 +0000
committeraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-05-29 12:57:52 +0000
commit9abc5ca551dbc7d71a17b30d86eee03130dcf020 (patch)
tree1f6fc5032906e0d9a88dc65d2d24d5bc2953b118 /init/init.c
parent4b2b47404e76f87c4103f05f287a65908ae5c7e3 (diff)
downloadbusybox-w32-9abc5ca551dbc7d71a17b30d86eee03130dcf020.tar.gz
busybox-w32-9abc5ca551dbc7d71a17b30d86eee03130dcf020.tar.bz2
busybox-w32-9abc5ca551dbc7d71a17b30d86eee03130dcf020.zip
- set_term() doesn't need an argument. (Like r15220 this is just compile-tested)
text data bss dec hex filename 5432 32 8 5472 1560 init/init.o.r15220 5426 32 8 5466 155a init/init.o git-svn-id: svn://busybox.net/trunk/busybox@15221 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'init/init.c')
-rw-r--r--init/init.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/init/init.c b/init/init.c
index d800480ee..b9385cfad 100644
--- a/init/init.c
+++ b/init/init.c
@@ -266,11 +266,11 @@ static void message(int device, const char *fmt, ...)
266} 266}
267 267
268/* Set terminal settings to reasonable defaults */ 268/* Set terminal settings to reasonable defaults */
269static void set_term(int fd) 269static void set_term(void)
270{ 270{
271 struct termios tty; 271 struct termios tty;
272 272
273 tcgetattr(fd, &tty); 273 tcgetattr(STDIN_FILENO, &tty);
274 274
275 /* set control chars */ 275 /* set control chars */
276 tty.c_cc[VINTR] = 3; /* C-c */ 276 tty.c_cc[VINTR] = 3; /* C-c */
@@ -300,7 +300,7 @@ static void set_term(int fd)
300 tty.c_lflag = 300 tty.c_lflag =
301 ISIG | ICANON | ECHO | ECHOE | ECHOK | ECHOCTL | ECHOKE | IEXTEN; 301 ISIG | ICANON | ECHO | ECHOE | ECHOK | ECHOCTL | ECHOKE | IEXTEN;
302 302
303 tcsetattr(fd, TCSANOW, &tty); 303 tcsetattr(STDIN_FILENO, TCSANOW, &tty);
304} 304}
305 305
306static void console_init(void) 306static void console_init(void)
@@ -448,7 +448,7 @@ static pid_t run(const struct init_action *a)
448 open_new_terminal(a->terminal, 1); 448 open_new_terminal(a->terminal, 1);
449 449
450 /* Make sure the terminal will act fairly normal for us */ 450 /* Make sure the terminal will act fairly normal for us */
451 set_term(0); 451 set_term();
452 /* Setup stdout, stderr for the new process so 452 /* Setup stdout, stderr for the new process so
453 * they point to the supplied terminal */ 453 * they point to the supplied terminal */
454 dup(0); 454 dup(0);
@@ -744,7 +744,7 @@ static void exec_signal(int sig ATTRIBUTE_UNUSED)
744 open_new_terminal(a->terminal, 0); 744 open_new_terminal(a->terminal, 0);
745 745
746 /* Make sure the terminal will act fairly normal for us */ 746 /* Make sure the terminal will act fairly normal for us */
747 set_term(0); 747 set_term();
748 /* Setup stdout, stderr on the supplied terminal */ 748 /* Setup stdout, stderr on the supplied terminal */
749 dup(0); 749 dup(0);
750 dup(0); 750 dup(0);
@@ -1059,7 +1059,7 @@ int init_main(int argc, char **argv)
1059 close(2); 1059 close(2);
1060 1060
1061 if (device_open(console, O_RDWR | O_NOCTTY) == 0) { 1061 if (device_open(console, O_RDWR | O_NOCTTY) == 0) {
1062 set_term(0); 1062 set_term();
1063 close(0); 1063 close(0);
1064 } 1064 }
1065 1065