Changed bb_regcomp to xregcomp and #if 0'ed out destroy_cmd_strs in sed.c
[oweals/busybox.git] / init.c
diff --git a/init.c b/init.c
index b368c00edde718440707fbf1287bfaf1efe86aa1..f38d154b7657f843fa5b4ab538b40e916e898d8a 100644 (file)
--- a/init.c
+++ b/init.c
@@ -110,7 +110,6 @@ struct serial_struct {
 #if defined(__GLIBC__)
 #include <sys/kdaemon.h>
 #else
-#include <linux/unistd.h>              /* for _syscall() macro */
 static _syscall2(int, bdflush, int, func, int, data);
 #endif                                                 /* __GLIBC__ */
 
@@ -244,8 +243,6 @@ static void message(int device, char *fmt, ...)
        }
 }
 
-#define CTRLCHAR(ch)   ((ch)-0x40)
-
 /* Set terminal settings to reasonable defaults */
 void set_term(int fd)
 {
@@ -254,14 +251,14 @@ void set_term(int fd)
        tcgetattr(fd, &tty);
 
        /* set control chars */
-       tty.c_cc[VINTR]  = CTRLCHAR('C');       /* Ctrl-C */
-       tty.c_cc[VQUIT]  = CTRLCHAR('\\');      /* Ctrl-\ */
-       tty.c_cc[VERASE] = CTRLCHAR('?');       /* Ctrl-? */
-       tty.c_cc[VKILL]  = CTRLCHAR('U');       /* Ctrl-U */
-       tty.c_cc[VEOF]   = CTRLCHAR('D');       /* Ctrl-D */
-       tty.c_cc[VSTART] = CTRLCHAR('Q');       /* Ctrl-Q */
-       tty.c_cc[VSTOP]  = CTRLCHAR('S');       /* Ctrl-S */
-       tty.c_cc[VSUSP]  = CTRLCHAR('Z');       /* Ctrl-Z */
+       tty.c_cc[VINTR]  = 3;   /* C-c */
+       tty.c_cc[VQUIT]  = 28;  /* C-\ */
+       tty.c_cc[VERASE] = 127; /* C-? */
+       tty.c_cc[VKILL]  = 21;  /* C-u */
+       tty.c_cc[VEOF]   = 4;   /* C-d */
+       tty.c_cc[VSTART] = 17;  /* C-q */
+       tty.c_cc[VSTOP]  = 19;  /* C-s */
+       tty.c_cc[VSUSP]  = 26;  /* C-z */
 
        /* use line dicipline 0 */
        tty.c_line = 0;
@@ -894,7 +891,7 @@ extern int init_main(int argc, char **argv)
        /* Expect to be invoked as init with PID=1 or be invoked as linuxrc */
        if (getpid() != 1
 #ifdef BB_FEATURE_LINUXRC
-                       && strstr(argv[0], "linuxrc") == NULL
+                       && strstr(applet_name, "linuxrc") == NULL
 #endif
                          )
        {