svn commit: trunk/busybox/init

aldot at busybox.net aldot at busybox.net
Mon May 29 12:57:53 UTC 2006


Author: aldot
Date: 2006-05-29 05:57:52 -0700 (Mon, 29 May 2006)
New Revision: 15221

Log:
- 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



Modified:
   trunk/busybox/init/init.c


Changeset:
Modified: trunk/busybox/init/init.c
===================================================================
--- trunk/busybox/init/init.c	2006-05-29 12:54:16 UTC (rev 15220)
+++ trunk/busybox/init/init.c	2006-05-29 12:57:52 UTC (rev 15221)
@@ -266,11 +266,11 @@
 }
 
 /* Set terminal settings to reasonable defaults */
-static void set_term(int fd)
+static void set_term(void)
 {
 	struct termios tty;
 
-	tcgetattr(fd, &tty);
+	tcgetattr(STDIN_FILENO, &tty);
 
 	/* set control chars */
 	tty.c_cc[VINTR] = 3;	/* C-c */
@@ -300,7 +300,7 @@
 	tty.c_lflag =
 		ISIG | ICANON | ECHO | ECHOE | ECHOK | ECHOCTL | ECHOKE | IEXTEN;
 
-	tcsetattr(fd, TCSANOW, &tty);
+	tcsetattr(STDIN_FILENO, TCSANOW, &tty);
 }
 
 static void console_init(void)
@@ -448,7 +448,7 @@
 		open_new_terminal(a->terminal, 1);
 
 		/* Make sure the terminal will act fairly normal for us */
-		set_term(0);
+		set_term();
 		/* Setup stdout, stderr for the new process so
 		 * they point to the supplied terminal */
 		dup(0);
@@ -744,7 +744,7 @@
 			open_new_terminal(a->terminal, 0);
 
 			/* Make sure the terminal will act fairly normal for us */
-			set_term(0);
+			set_term();
 			/* Setup stdout, stderr on the supplied terminal */
 			dup(0);
 			dup(0);
@@ -1059,7 +1059,7 @@
 	close(2);
 
 	if (device_open(console, O_RDWR | O_NOCTTY) == 0) {
-		set_term(0);
+		set_term();
 		close(0);
 	}
 




More information about the busybox-cvs mailing list