- consolidate "Sending SIG%s to all processes"; untested..
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 30 May 2006 18:17:21 +0000 (18:17 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 30 May 2006 18:17:21 +0000 (18:17 -0000)
   text    data     bss     dec     hex filename
   5379      32       8    5419    152b init/init.o.oorig
   5358      32       8    5398    1516 init/init.o

init/init.c
init/init_shared.c
init/init_shared.h

index b17ebc2ce9f7d57d911bebcd4be4b280a9cc55fc..d072a22091f766601624b2b3355b3b3bcec778b4 100644 (file)
@@ -683,12 +683,12 @@ static void shutdown_system(void)
        sync();
 
        /* Send signals to every process _except_ pid 1 */
-       message(CONSOLE | LOG, "Sending SIGTERM to all processes.");
+       message(CONSOLE | LOG, init_sending_format, "TERM");
        kill(-1, SIGTERM);
        sleep(1);
        sync();
 
-       message(CONSOLE | LOG, "Sending SIGKILL to all processes.");
+       message(CONSOLE | LOG, init_sending_format, "KILL");
        kill(-1, SIGKILL);
        sleep(1);
 
index 6404da55a1a0b89ae3932044ae247395325653f6..190d0a33e8410bcce3d275bd65c093a7c5dc9f6e 100644 (file)
@@ -44,16 +44,16 @@ int bb_shutdown_system(unsigned long magic)
        sync();
 
        /* Send signals to every process _except_ pid 1 */
-       message = "Sending SIGTERM to all processes.";
-       syslog(pri, "%s", message);
+       message = "TERM";
+       syslog(pri, init_sending_format, message);
        printf(bb_shutdown_format, message);
 
        kill(-1, SIGTERM);
        sleep(1);
        sync();
 
-       message = "Sending SIGKILL to all processes.";
-       syslog(pri, "%s", message);
+       message = "KILL";
+       syslog(pri, init_sending_format, message);
        printf(bb_shutdown_format, message);
 
        kill(-1, SIGKILL);
index 1e4cfac98bd4955dd857e752203a211f467337f2..4431a032415e5c25c9292eff7e5ef6f7b30d99b5 100644 (file)
@@ -1,3 +1,4 @@
 extern int kill_init(int sig);
 extern int bb_shutdown_system(unsigned long magic);
+const char * const init_sending_format = "Sending SIG%s to all processes.";