aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/halt.c5
-rw-r--r--init/init_shared.c2
-rw-r--r--init/init_shared.h6
-rw-r--r--init/mesg.c21
4 files changed, 14 insertions, 20 deletions
diff --git a/init/halt.c b/init/halt.c
index f3627f206..d1f561b63 100644
--- a/init/halt.c
+++ b/init/halt.c
@@ -7,10 +7,9 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
8 */ 8 */
9 9
10#include "busybox.h"
10#include <signal.h> 11#include <signal.h>
11#include <sys/reboot.h> 12#include <sys/reboot.h>
12#include "busybox.h"
13
14#include <unistd.h> 13#include <unistd.h>
15 14
16int halt_main(int argc, char *argv[]) 15int halt_main(int argc, char *argv[])
@@ -40,7 +39,7 @@ RB_AUTOBOOT
40 flags = bb_getopt_ulflags(argc, argv, "d:nf", &delay); 39 flags = bb_getopt_ulflags(argc, argv, "d:nf", &delay);
41 if (flags&1) sleep(atoi(delay)); 40 if (flags&1) sleep(atoi(delay));
42 if (!(flags&2)) sync(); 41 if (!(flags&2)) sync();
43 42
44 /* Perform action. */ 43 /* Perform action. */
45 if (ENABLE_INIT && !(flags & 4)) { 44 if (ENABLE_INIT && !(flags & 4)) {
46 if (ENABLE_FEATURE_INITRD) { 45 if (ENABLE_FEATURE_INITRD) {
diff --git a/init/init_shared.c b/init/init_shared.c
index 722d57c6f..0abe72fdf 100644
--- a/init/init_shared.c
+++ b/init/init_shared.c
@@ -7,6 +7,7 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
8 */ 8 */
9 9
10#include "busybox.h"
10#include <signal.h> 11#include <signal.h>
11#include <stdlib.h> 12#include <stdlib.h>
12#include <sys/types.h> 13#include <sys/types.h>
@@ -14,7 +15,6 @@
14#include <getopt.h> 15#include <getopt.h>
15#include <sys/reboot.h> 16#include <sys/reboot.h>
16#include <sys/syslog.h> 17#include <sys/syslog.h>
17#include "busybox.h"
18#include "init_shared.h" 18#include "init_shared.h"
19 19
20const char * const init_sending_format = "Sending SIG%s to all processes."; 20const char * const init_sending_format = "Sending SIG%s to all processes.";
diff --git a/init/init_shared.h b/init/init_shared.h
index 0f3fe5b48..6df8de484 100644
--- a/init/init_shared.h
+++ b/init/init_shared.h
@@ -1,3 +1,9 @@
1/* vi: set sw=4 ts=4: */
2/*
3 * Helper functions shared by init et al.
4 *
5 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
6 */
1extern int kill_init(int sig); 7extern int kill_init(int sig);
2extern int bb_shutdown_system(unsigned long magic); 8extern int bb_shutdown_system(unsigned long magic);
3extern const char * const init_sending_format; 9extern const char * const init_sending_format;
diff --git a/init/mesg.c b/init/mesg.c
index 874c22089..7e47644c3 100644
--- a/init/mesg.c
+++ b/init/mesg.c
@@ -1,26 +1,15 @@
1/* vi: set sw=4 ts=4: */
1/* 2/*
2 * mesg implementation for busybox 3 * mesg implementation for busybox
3 * 4 *
4 * Copyright (c) 2002 Manuel Novoa III <mjn3@codepoet.org> 5 * Copyright (c) 2002 Manuel Novoa III <mjn3@codepoet.org>
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify 7 * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */ 8 */
20 9
10#include "busybox.h"
21#include <unistd.h> 11#include <unistd.h>
22#include <stdlib.h> 12#include <stdlib.h>
23#include "busybox.h"
24 13
25#ifdef USE_TTY_GROUP 14#ifdef USE_TTY_GROUP
26#define S_IWGRP_OR_S_IWOTH S_IWGRP 15#define S_IWGRP_OR_S_IWOTH S_IWGRP