diff options
245 files changed, 268 insertions, 25 deletions
diff --git a/applets/Kbuild b/applets/Kbuild index 8999ff097..4323e85f2 100644 --- a/applets/Kbuild +++ b/applets/Kbuild | |||
@@ -18,5 +18,5 @@ HOSTCFLAGS_usage.o = -I$(srctree)/include | |||
18 | 18 | ||
19 | quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h | 19 | quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h |
20 | cmd_gen_usage_compressed = $(srctree)/applets/usage_compressed include/usage_compressed.h applets | 20 | cmd_gen_usage_compressed = $(srctree)/applets/usage_compressed include/usage_compressed.h applets |
21 | include/usage_compressed.h: $(srctree)/include/usage.h applets/usage | 21 | include/usage_compressed.h: .config $(srctree)/include/usage.h applets/usage |
22 | $(call cmd,gen_usage_compressed) | 22 | $(call cmd,gen_usage_compressed) |
diff --git a/applets/busybox.c b/applets/busybox.c index 79634f99e..99af9ca02 100644 --- a/applets/busybox.c +++ b/applets/busybox.c | |||
@@ -73,6 +73,7 @@ int main(int argc, char **argv) | |||
73 | bb_error_msg_and_die("applet not found"); | 73 | bb_error_msg_and_die("applet not found"); |
74 | } | 74 | } |
75 | 75 | ||
76 | int busybox_main(int argc, char **argv); | ||
76 | int busybox_main(int argc, char **argv) | 77 | int busybox_main(int argc, char **argv) |
77 | { | 78 | { |
78 | /* | 79 | /* |
diff --git a/archival/ar.c b/archival/ar.c index 4bcf6946f..23d9b49a5 100644 --- a/archival/ar.c +++ b/archival/ar.c | |||
@@ -38,6 +38,7 @@ static void header_verbose_list_ar(const file_header_t *file_header) | |||
38 | #define AR_OPT_CREATE 0x20 | 38 | #define AR_OPT_CREATE 0x20 |
39 | #define AR_OPT_INSERT 0x40 | 39 | #define AR_OPT_INSERT 0x40 |
40 | 40 | ||
41 | int ar_main(int argc, char **argv); | ||
41 | int ar_main(int argc, char **argv) | 42 | int ar_main(int argc, char **argv) |
42 | { | 43 | { |
43 | archive_handle_t *archive_handle; | 44 | archive_handle_t *archive_handle; |
diff --git a/archival/bunzip2.c b/archival/bunzip2.c index a6cd17611..1deac7b53 100644 --- a/archival/bunzip2.c +++ b/archival/bunzip2.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #define BUNZIP2_OPT_STDOUT 1 | 12 | #define BUNZIP2_OPT_STDOUT 1 |
13 | #define BUNZIP2_OPT_FORCE 2 | 13 | #define BUNZIP2_OPT_FORCE 2 |
14 | 14 | ||
15 | int bunzip2_main(int argc, char **argv); | ||
15 | int bunzip2_main(int argc, char **argv) | 16 | int bunzip2_main(int argc, char **argv) |
16 | { | 17 | { |
17 | USE_DESKTOP(long long) int status; | 18 | USE_DESKTOP(long long) int status; |
diff --git a/archival/cpio.c b/archival/cpio.c index 73651ba10..011386782 100644 --- a/archival/cpio.c +++ b/archival/cpio.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #define CPIO_OPT_CREATE_LEADING_DIR 0x20 | 26 | #define CPIO_OPT_CREATE_LEADING_DIR 0x20 |
27 | #define CPIO_OPT_PRESERVE_MTIME 0x40 | 27 | #define CPIO_OPT_PRESERVE_MTIME 0x40 |
28 | 28 | ||
29 | int cpio_main(int argc, char **argv); | ||
29 | int cpio_main(int argc, char **argv) | 30 | int cpio_main(int argc, char **argv) |
30 | { | 31 | { |
31 | archive_handle_t *archive_handle; | 32 | archive_handle_t *archive_handle; |
diff --git a/archival/dpkg.c b/archival/dpkg.c index 126138f80..5c69d9c64 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c | |||
@@ -1566,6 +1566,7 @@ static void configure_package(deb_file_t *deb_file) | |||
1566 | set_status(status_num, "installed", 3); | 1566 | set_status(status_num, "installed", 3); |
1567 | } | 1567 | } |
1568 | 1568 | ||
1569 | int dpkg_main(int argc, char **argv); | ||
1569 | int dpkg_main(int argc, char **argv) | 1570 | int dpkg_main(int argc, char **argv) |
1570 | { | 1571 | { |
1571 | deb_file_t **deb_file = NULL; | 1572 | deb_file_t **deb_file = NULL; |
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c index c9b8a0429..fde3c3382 100644 --- a/archival/dpkg_deb.c +++ b/archival/dpkg_deb.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #define DPKG_DEB_OPT_EXTRACT 8 | 13 | #define DPKG_DEB_OPT_EXTRACT 8 |
14 | #define DPKG_DEB_OPT_EXTRACT_VERBOSE 16 | 14 | #define DPKG_DEB_OPT_EXTRACT_VERBOSE 16 |
15 | 15 | ||
16 | int dpkg_deb_main(int argc, char **argv); | ||
16 | int dpkg_deb_main(int argc, char **argv) | 17 | int dpkg_deb_main(int argc, char **argv) |
17 | { | 18 | { |
18 | archive_handle_t *ar_archive; | 19 | archive_handle_t *ar_archive; |
diff --git a/archival/gunzip.c b/archival/gunzip.c index c5deec3ce..3d99fe506 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #define GUNZIP_OPT_DECOMPRESS 8 | 36 | #define GUNZIP_OPT_DECOMPRESS 8 |
37 | #define GUNZIP_OPT_VERBOSE 0x10 | 37 | #define GUNZIP_OPT_VERBOSE 0x10 |
38 | 38 | ||
39 | int gunzip_main(int argc, char **argv); | ||
39 | int gunzip_main(int argc, char **argv) | 40 | int gunzip_main(int argc, char **argv) |
40 | { | 41 | { |
41 | USE_DESKTOP(long long) int status; | 42 | USE_DESKTOP(long long) int status; |
diff --git a/archival/gzip.c b/archival/gzip.c index 2b520b3e7..48d1652bc 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
@@ -2086,6 +2086,7 @@ static void abort_gzip(int ATTRIBUTE_UNUSED ignored) | |||
2086 | exit(1); | 2086 | exit(1); |
2087 | } | 2087 | } |
2088 | 2088 | ||
2089 | int gzip_main(int argc, char **argv); | ||
2089 | int gzip_main(int argc, char **argv) | 2090 | int gzip_main(int argc, char **argv) |
2090 | { | 2091 | { |
2091 | enum { | 2092 | enum { |
diff --git a/archival/rpm.c b/archival/rpm.c index deb87c180..9ab12df2d 100644 --- a/archival/rpm.c +++ b/archival/rpm.c | |||
@@ -80,6 +80,7 @@ static void fileaction_dobackup(char *filename, int fileref); | |||
80 | static void fileaction_setowngrp(char *filename, int fileref); | 80 | static void fileaction_setowngrp(char *filename, int fileref); |
81 | static void loop_through_files(int filetag, void (*fileaction)(char *filename, int fileref)); | 81 | static void loop_through_files(int filetag, void (*fileaction)(char *filename, int fileref)); |
82 | 82 | ||
83 | int rpm_main(int argc, char **argv); | ||
83 | int rpm_main(int argc, char **argv) | 84 | int rpm_main(int argc, char **argv) |
84 | { | 85 | { |
85 | int opt = 0, func = 0, rpm_fd, offset; | 86 | int opt = 0, func = 0, rpm_fd, offset; |
diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c index 3442046c4..7a2e64b86 100644 --- a/archival/rpm2cpio.c +++ b/archival/rpm2cpio.c | |||
@@ -49,6 +49,7 @@ static void skip_header(int rpm_fd) | |||
49 | } | 49 | } |
50 | 50 | ||
51 | /* No getopt required */ | 51 | /* No getopt required */ |
52 | int rpm2cpio_main(int argc, char **argv); | ||
52 | int rpm2cpio_main(int argc, char **argv) | 53 | int rpm2cpio_main(int argc, char **argv) |
53 | { | 54 | { |
54 | struct rpm_lead lead; | 55 | struct rpm_lead lead; |
diff --git a/archival/tar.c b/archival/tar.c index 6c15f65c9..8bb845942 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -752,6 +752,7 @@ static const struct option tar_long_options[] = { | |||
752 | }; | 752 | }; |
753 | #endif | 753 | #endif |
754 | 754 | ||
755 | int tar_main(int argc, char **argv); | ||
755 | int tar_main(int argc, char **argv) | 756 | int tar_main(int argc, char **argv) |
756 | { | 757 | { |
757 | char (*get_header_ptr)(archive_handle_t *) = get_header_tar; | 758 | char (*get_header_ptr)(archive_handle_t *) = get_header_tar; |
diff --git a/archival/uncompress.c b/archival/uncompress.c index 461179016..b16c353ec 100644 --- a/archival/uncompress.c +++ b/archival/uncompress.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #define GUNZIP_TO_STDOUT 1 | 11 | #define GUNZIP_TO_STDOUT 1 |
12 | #define GUNZIP_FORCE 2 | 12 | #define GUNZIP_FORCE 2 |
13 | 13 | ||
14 | int uncompress_main(int argc, char **argv); | ||
14 | int uncompress_main(int argc, char **argv) | 15 | int uncompress_main(int argc, char **argv) |
15 | { | 16 | { |
16 | int status = EXIT_SUCCESS; | 17 | int status = EXIT_SUCCESS; |
diff --git a/archival/unlzma.c b/archival/unlzma.c index 20c4ff2a7..24632c4a7 100644 --- a/archival/unlzma.c +++ b/archival/unlzma.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #define UNLZMA_OPT_STDOUT 1 | 16 | #define UNLZMA_OPT_STDOUT 1 |
17 | 17 | ||
18 | int unlzma_main(int argc, char **argv); | ||
18 | int unlzma_main(int argc, char **argv) | 19 | int unlzma_main(int argc, char **argv) |
19 | { | 20 | { |
20 | USE_DESKTOP(long long) int status; | 21 | USE_DESKTOP(long long) int status; |
diff --git a/archival/unzip.c b/archival/unzip.c index b10132ebd..5e631705c 100644 --- a/archival/unzip.c +++ b/archival/unzip.c | |||
@@ -93,6 +93,7 @@ static int unzip_extract(zip_header_t *zip_header, int src_fd, int dst_fd) | |||
93 | return 0; | 93 | return 0; |
94 | } | 94 | } |
95 | 95 | ||
96 | int unzip_main(int argc, char **argv); | ||
96 | int unzip_main(int argc, char **argv) | 97 | int unzip_main(int argc, char **argv) |
97 | { | 98 | { |
98 | zip_header_t zip_header; | 99 | zip_header_t zip_header; |
diff --git a/console-tools/chvt.c b/console-tools/chvt.c index bbc5a9c31..50908115c 100644 --- a/console-tools/chvt.c +++ b/console-tools/chvt.c | |||
@@ -15,6 +15,7 @@ enum { | |||
15 | VT_WAITACTIVE = 0x5607 /* wait for vt active */ | 15 | VT_WAITACTIVE = 0x5607 /* wait for vt active */ |
16 | }; | 16 | }; |
17 | 17 | ||
18 | int chvt_main(int argc, char **argv); | ||
18 | int chvt_main(int argc, char **argv) | 19 | int chvt_main(int argc, char **argv) |
19 | { | 20 | { |
20 | int fd, num; | 21 | int fd, num; |
diff --git a/console-tools/clear.c b/console-tools/clear.c index 9686d5004..8e34d6d9a 100644 --- a/console-tools/clear.c +++ b/console-tools/clear.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include "busybox.h" | 15 | #include "busybox.h" |
16 | 16 | ||
17 | 17 | ||
18 | int clear_main(int argc, char **argv); | ||
18 | int clear_main(int argc, char **argv) | 19 | int clear_main(int argc, char **argv) |
19 | { | 20 | { |
20 | return printf("\033[H\033[J") != 6; | 21 | return printf("\033[H\033[J") != 6; |
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c index cd581b1c8..81ea68ebb 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c | |||
@@ -15,6 +15,7 @@ | |||
15 | /* From <linux/vt.h> */ | 15 | /* From <linux/vt.h> */ |
16 | enum { VT_DISALLOCATE = 0x5608 }; /* free memory associated to vt */ | 16 | enum { VT_DISALLOCATE = 0x5608 }; /* free memory associated to vt */ |
17 | 17 | ||
18 | int deallocvt_main(int argc, char *argv[]); | ||
18 | int deallocvt_main(int argc, char *argv[]) | 19 | int deallocvt_main(int argc, char *argv[]) |
19 | { | 20 | { |
20 | /* num = 0 deallocate all unused consoles */ | 21 | /* num = 0 deallocate all unused consoles */ |
diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c index 7c6633ae8..0c1914830 100644 --- a/console-tools/dumpkmap.c +++ b/console-tools/dumpkmap.c | |||
@@ -22,18 +22,19 @@ struct kbentry { | |||
22 | #define NR_KEYS 128 | 22 | #define NR_KEYS 128 |
23 | #define MAX_NR_KEYMAPS 256 | 23 | #define MAX_NR_KEYMAPS 256 |
24 | 24 | ||
25 | int dumpkmap_main(int argc, char **argv); | ||
25 | int dumpkmap_main(int argc, char **argv) | 26 | int dumpkmap_main(int argc, char **argv) |
26 | { | 27 | { |
27 | struct kbentry ke; | 28 | struct kbentry ke; |
28 | int i, j, fd; | 29 | int i, j, fd; |
29 | char flags[MAX_NR_KEYMAPS], magic[] = "bkeymap"; | 30 | char flags[MAX_NR_KEYMAPS]; |
30 | 31 | ||
31 | if (argc >= 2 && *argv[1] == '-') | 32 | if (argc >= 2 && argv[1][0] == '-') |
32 | bb_show_usage(); | 33 | bb_show_usage(); |
33 | 34 | ||
34 | fd = xopen(CURRENT_VC, O_RDWR); | 35 | fd = xopen(CURRENT_VC, O_RDWR); |
35 | 36 | ||
36 | write(1, magic, 7); | 37 | write(1, "bkeymap", 7); |
37 | 38 | ||
38 | /* Here we want to set everything to 0 except for indexes: | 39 | /* Here we want to set everything to 0 except for indexes: |
39 | * [0-2] [4-6] [8-10] [12] */ | 40 | * [0-2] [4-6] [8-10] [12] */ |
diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c index 6aa739ba4..f691b11af 100644 --- a/console-tools/loadfont.c +++ b/console-tools/loadfont.c | |||
@@ -30,6 +30,7 @@ struct psf_header { | |||
30 | 30 | ||
31 | static void loadnewfont(int fd); | 31 | static void loadnewfont(int fd); |
32 | 32 | ||
33 | int loadfont_main(int argc, char **argv); | ||
33 | int loadfont_main(int argc, char **argv) | 34 | int loadfont_main(int argc, char **argv) |
34 | { | 35 | { |
35 | int fd; | 36 | int fd; |
diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c index 74a2378b4..a141435e2 100644 --- a/console-tools/loadkmap.c +++ b/console-tools/loadkmap.c | |||
@@ -25,6 +25,7 @@ struct kbentry { | |||
25 | #define NR_KEYS 128 | 25 | #define NR_KEYS 128 |
26 | #define MAX_NR_KEYMAPS 256 | 26 | #define MAX_NR_KEYMAPS 256 |
27 | 27 | ||
28 | int loadkmap_main(int argc, char **argv); | ||
28 | int loadkmap_main(int argc, char **argv) | 29 | int loadkmap_main(int argc, char **argv) |
29 | { | 30 | { |
30 | struct kbentry ke; | 31 | struct kbentry ke; |
diff --git a/console-tools/openvt.c b/console-tools/openvt.c index c7b3e4fa4..9296219bd 100644 --- a/console-tools/openvt.c +++ b/console-tools/openvt.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include "busybox.h" | 13 | #include "busybox.h" |
14 | 14 | ||
15 | int openvt_main(int argc, char **argv); | ||
15 | int openvt_main(int argc, char **argv) | 16 | int openvt_main(int argc, char **argv) |
16 | { | 17 | { |
17 | int fd; | 18 | int fd; |
diff --git a/console-tools/reset.c b/console-tools/reset.c index 26aab667b..03b078c5d 100644 --- a/console-tools/reset.c +++ b/console-tools/reset.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <unistd.h> | 15 | #include <unistd.h> |
16 | #include "busybox.h" | 16 | #include "busybox.h" |
17 | 17 | ||
18 | int reset_main(int argc, char **argv); | ||
18 | int reset_main(int argc, char **argv) | 19 | int reset_main(int argc, char **argv) |
19 | { | 20 | { |
20 | if (isatty(1)) { | 21 | if (isatty(1)) { |
diff --git a/console-tools/resize.c b/console-tools/resize.c index c405629aa..2fe5526fb 100644 --- a/console-tools/resize.c +++ b/console-tools/resize.c | |||
@@ -9,6 +9,7 @@ | |||
9 | /* no options, no getopt */ | 9 | /* no options, no getopt */ |
10 | #include "busybox.h" | 10 | #include "busybox.h" |
11 | 11 | ||
12 | int resize_main(int argc, char **argv); | ||
12 | int resize_main(int argc, char **argv) | 13 | int resize_main(int argc, char **argv) |
13 | { | 14 | { |
14 | struct termios old, new; | 15 | struct termios old, new; |
diff --git a/console-tools/setconsole.c b/console-tools/setconsole.c index ef81f298b..6621d25f8 100644 --- a/console-tools/setconsole.c +++ b/console-tools/setconsole.c | |||
@@ -18,6 +18,7 @@ static const struct option setconsole_long_options[] = { | |||
18 | 18 | ||
19 | #define OPT_SETCONS_RESET 1 | 19 | #define OPT_SETCONS_RESET 1 |
20 | 20 | ||
21 | int setconsole_main(int argc, char **argv); | ||
21 | int setconsole_main(int argc, char **argv) | 22 | int setconsole_main(int argc, char **argv) |
22 | { | 23 | { |
23 | unsigned long flags; | 24 | unsigned long flags; |
diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c index d82525786..ff137d562 100644 --- a/console-tools/setkeycodes.c +++ b/console-tools/setkeycodes.c | |||
@@ -9,9 +9,6 @@ | |||
9 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <stdio.h> | ||
13 | #include <stdlib.h> | ||
14 | #include <fcntl.h> | ||
15 | #include <sys/ioctl.h> | 12 | #include <sys/ioctl.h> |
16 | #include "busybox.h" | 13 | #include "busybox.h" |
17 | 14 | ||
@@ -24,8 +21,8 @@ enum { | |||
24 | KDSETKEYCODE = 0x4B4D /* write kernel keycode table entry */ | 21 | KDSETKEYCODE = 0x4B4D /* write kernel keycode table entry */ |
25 | }; | 22 | }; |
26 | 23 | ||
27 | extern int | 24 | int setkeycodes_main(int argc, char** argv); |
28 | setkeycodes_main(int argc, char** argv) | 25 | int setkeycodes_main(int argc, char** argv) |
29 | { | 26 | { |
30 | int fd, sc; | 27 | int fd, sc; |
31 | struct kbkeycode a; | 28 | struct kbkeycode a; |
diff --git a/coreutils/basename.c b/coreutils/basename.c index 30f76dc12..46f7122c8 100644 --- a/coreutils/basename.c +++ b/coreutils/basename.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <string.h> | 25 | #include <string.h> |
26 | #include "busybox.h" | 26 | #include "busybox.h" |
27 | 27 | ||
28 | int basename_main(int argc, char **argv); | ||
28 | int basename_main(int argc, char **argv) | 29 | int basename_main(int argc, char **argv) |
29 | { | 30 | { |
30 | size_t m, n; | 31 | size_t m, n; |
diff --git a/coreutils/cal.c b/coreutils/cal.c index 82ebf143a..3d617916e 100644 --- a/coreutils/cal.c +++ b/coreutils/cal.c | |||
@@ -77,6 +77,7 @@ static char *build_row(char *p, int *dp); | |||
77 | #define J_WEEK_LEN (WEEK_LEN + 7) | 77 | #define J_WEEK_LEN (WEEK_LEN + 7) |
78 | #define HEAD_SEP 2 /* spaces between day headings */ | 78 | #define HEAD_SEP 2 /* spaces between day headings */ |
79 | 79 | ||
80 | int cal_main(int argc, char **argv); | ||
80 | int cal_main(int argc, char **argv) | 81 | int cal_main(int argc, char **argv) |
81 | { | 82 | { |
82 | struct tm *local_time; | 83 | struct tm *local_time; |
diff --git a/coreutils/cat.c b/coreutils/cat.c index 7a34891e8..7bab325ef 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c | |||
@@ -34,6 +34,7 @@ int bb_cat(char **argv) | |||
34 | return retval; | 34 | return retval; |
35 | } | 35 | } |
36 | 36 | ||
37 | int cat_main(int argc, char **argv); | ||
37 | int cat_main(int argc, char **argv) | 38 | int cat_main(int argc, char **argv) |
38 | { | 39 | { |
39 | getopt32(argc, argv, "u"); | 40 | getopt32(argc, argv, "u"); |
diff --git a/coreutils/catv.c b/coreutils/catv.c index 66f30693a..826e0e9a6 100644 --- a/coreutils/catv.c +++ b/coreutils/catv.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include "busybox.h" | 13 | #include "busybox.h" |
14 | 14 | ||
15 | int catv_main(int argc, char **argv); | ||
15 | int catv_main(int argc, char **argv) | 16 | int catv_main(int argc, char **argv) |
16 | { | 17 | { |
17 | int retval = EXIT_SUCCESS, fd; | 18 | int retval = EXIT_SUCCESS, fd; |
diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c index 465ea0ccf..eaa29cbc6 100644 --- a/coreutils/chgrp.c +++ b/coreutils/chgrp.c | |||
@@ -16,6 +16,7 @@ | |||
16 | /* FIXME - move to .h */ | 16 | /* FIXME - move to .h */ |
17 | extern int chown_main(int argc, char **argv); | 17 | extern int chown_main(int argc, char **argv); |
18 | 18 | ||
19 | int chgrp_main(int argc, char **argv); | ||
19 | int chgrp_main(int argc, char **argv) | 20 | int chgrp_main(int argc, char **argv) |
20 | { | 21 | { |
21 | /* "chgrp [opts] abc file(s)" == "chown [opts] :abc file(s)" */ | 22 | /* "chgrp [opts] abc file(s)" == "chown [opts] :abc file(s)" */ |
diff --git a/coreutils/chmod.c b/coreutils/chmod.c index f298d0967..74788bbbe 100644 --- a/coreutils/chmod.c +++ b/coreutils/chmod.c | |||
@@ -64,6 +64,7 @@ static int fileAction(const char *fileName, struct stat *statbuf, void* param, i | |||
64 | return FALSE; | 64 | return FALSE; |
65 | } | 65 | } |
66 | 66 | ||
67 | int chmod_main(int argc, char **argv); | ||
67 | int chmod_main(int argc, char **argv) | 68 | int chmod_main(int argc, char **argv) |
68 | { | 69 | { |
69 | int retval = EXIT_SUCCESS; | 70 | int retval = EXIT_SUCCESS; |
diff --git a/coreutils/chown.c b/coreutils/chown.c index 09cf73f04..dad5ce063 100644 --- a/coreutils/chown.c +++ b/coreutils/chown.c | |||
@@ -53,6 +53,7 @@ static int fileAction(const char *fileName, struct stat *statbuf, | |||
53 | return FALSE; | 53 | return FALSE; |
54 | } | 54 | } |
55 | 55 | ||
56 | int chown_main(int argc, char **argv); | ||
56 | int chown_main(int argc, char **argv) | 57 | int chown_main(int argc, char **argv) |
57 | { | 58 | { |
58 | char *groupName; | 59 | char *groupName; |
diff --git a/coreutils/chroot.c b/coreutils/chroot.c index 62cfdc244..16c743fef 100644 --- a/coreutils/chroot.c +++ b/coreutils/chroot.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include "busybox.h" | 12 | #include "busybox.h" |
13 | 13 | ||
14 | int chroot_main(int argc, char **argv); | ||
14 | int chroot_main(int argc, char **argv) | 15 | int chroot_main(int argc, char **argv) |
15 | { | 16 | { |
16 | if (argc < 2) { | 17 | if (argc < 2) { |
diff --git a/coreutils/cksum.c b/coreutils/cksum.c index 52213328c..66a255c4e 100644 --- a/coreutils/cksum.c +++ b/coreutils/cksum.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include "busybox.h" | 9 | #include "busybox.h" |
10 | 10 | ||
11 | int cksum_main(int argc, char **argv); | ||
11 | int cksum_main(int argc, char **argv) | 12 | int cksum_main(int argc, char **argv) |
12 | { | 13 | { |
13 | 14 | ||
diff --git a/coreutils/cmp.c b/coreutils/cmp.c index 71007eac1..0aebd4b4d 100644 --- a/coreutils/cmp.c +++ b/coreutils/cmp.c | |||
@@ -42,6 +42,7 @@ static const char opt_chars[] = "sl"; | |||
42 | #define CMP_OPT_s (1<<0) | 42 | #define CMP_OPT_s (1<<0) |
43 | #define CMP_OPT_l (1<<1) | 43 | #define CMP_OPT_l (1<<1) |
44 | 44 | ||
45 | int cmp_main(int argc, char **argv); | ||
45 | int cmp_main(int argc, char **argv) | 46 | int cmp_main(int argc, char **argv) |
46 | { | 47 | { |
47 | FILE *fp1, *fp2, *outfile = stdout; | 48 | FILE *fp1, *fp2, *outfile = stdout; |
diff --git a/coreutils/comm.c b/coreutils/comm.c index 91f017753..b6412968d 100644 --- a/coreutils/comm.c +++ b/coreutils/comm.c | |||
@@ -108,6 +108,7 @@ static void cmp_files(char **infiles) | |||
108 | fclose(streams[1]); | 108 | fclose(streams[1]); |
109 | } | 109 | } |
110 | 110 | ||
111 | int comm_main(int argc, char **argv); | ||
111 | int comm_main(int argc, char **argv) | 112 | int comm_main(int argc, char **argv) |
112 | { | 113 | { |
113 | unsigned long flags; | 114 | unsigned long flags; |
diff --git a/coreutils/cp.c b/coreutils/cp.c index 47ad85ecf..7b0de477b 100644 --- a/coreutils/cp.c +++ b/coreutils/cp.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include "busybox.h" | 17 | #include "busybox.h" |
18 | #include "libcoreutils/coreutils.h" | 18 | #include "libcoreutils/coreutils.h" |
19 | 19 | ||
20 | int cp_main(int argc, char **argv); | ||
20 | int cp_main(int argc, char **argv) | 21 | int cp_main(int argc, char **argv) |
21 | { | 22 | { |
22 | struct stat source_stat; | 23 | struct stat source_stat; |
diff --git a/coreutils/cut.c b/coreutils/cut.c index a72b2c29a..22014fcfb 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c | |||
@@ -162,6 +162,7 @@ static void cut_file(FILE * file) | |||
162 | 162 | ||
163 | static const char _op_on_field[] = " only when operating on fields"; | 163 | static const char _op_on_field[] = " only when operating on fields"; |
164 | 164 | ||
165 | int cut_main(int argc, char **argv); | ||
165 | int cut_main(int argc, char **argv) | 166 | int cut_main(int argc, char **argv) |
166 | { | 167 | { |
167 | char *sopt, *ltok; | 168 | char *sopt, *ltok; |
diff --git a/coreutils/date.c b/coreutils/date.c index 034a18b98..dfc8b2f40 100644 --- a/coreutils/date.c +++ b/coreutils/date.c | |||
@@ -44,6 +44,7 @@ static void maybe_set_utc(int opt) | |||
44 | xputenv((char*)"TZ=UTC0"); | 44 | xputenv((char*)"TZ=UTC0"); |
45 | } | 45 | } |
46 | 46 | ||
47 | int date_main(int argc, char **argv); | ||
47 | int date_main(int argc, char **argv) | 48 | int date_main(int argc, char **argv) |
48 | { | 49 | { |
49 | time_t tm; | 50 | time_t tm; |
diff --git a/coreutils/dd.c b/coreutils/dd.c index 01f37abeb..4a094e81a 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c | |||
@@ -50,6 +50,7 @@ static ssize_t full_write_or_warn(int fd, const void *buf, size_t len, | |||
50 | #define XATOU_SFX xatoul_sfx | 50 | #define XATOU_SFX xatoul_sfx |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | int dd_main(int argc, char **argv); | ||
53 | int dd_main(int argc, char **argv) | 54 | int dd_main(int argc, char **argv) |
54 | { | 55 | { |
55 | enum { | 56 | enum { |
diff --git a/coreutils/df.c b/coreutils/df.c index 3b3292590..484cabb37 100644 --- a/coreutils/df.c +++ b/coreutils/df.c | |||
@@ -33,6 +33,7 @@ static long kscale(long b, long bs) | |||
33 | } | 33 | } |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | int df_main(int argc, char **argv); | ||
36 | int df_main(int argc, char **argv) | 37 | int df_main(int argc, char **argv) |
37 | { | 38 | { |
38 | long blocks_used; | 39 | long blocks_used; |
diff --git a/coreutils/diff.c b/coreutils/diff.c index c846e2b69..31c20f052 100644 --- a/coreutils/diff.c +++ b/coreutils/diff.c | |||
@@ -1170,6 +1170,7 @@ static void diffdir(char *p1, char *p2) | |||
1170 | #endif | 1170 | #endif |
1171 | 1171 | ||
1172 | 1172 | ||
1173 | int diff_main(int argc, char **argv); | ||
1173 | int diff_main(int argc, char **argv) | 1174 | int diff_main(int argc, char **argv) |
1174 | { | 1175 | { |
1175 | bool gotstdin = 0; | 1176 | bool gotstdin = 0; |
diff --git a/coreutils/dirname.c b/coreutils/dirname.c index e986a9701..4ecde3147 100644 --- a/coreutils/dirname.c +++ b/coreutils/dirname.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <stdlib.h> | 14 | #include <stdlib.h> |
15 | #include "busybox.h" | 15 | #include "busybox.h" |
16 | 16 | ||
17 | int dirname_main(int argc, char **argv); | ||
17 | int dirname_main(int argc, char **argv) | 18 | int dirname_main(int argc, char **argv) |
18 | { | 19 | { |
19 | if (argc != 2) { | 20 | if (argc != 2) { |
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c index 1ed8771c0..62c1361b2 100644 --- a/coreutils/dos2unix.c +++ b/coreutils/dos2unix.c | |||
@@ -82,6 +82,7 @@ static int convert(char *fn) | |||
82 | return 0; | 82 | return 0; |
83 | } | 83 | } |
84 | 84 | ||
85 | int dos2unix_main(int argc, char *argv[]); | ||
85 | int dos2unix_main(int argc, char *argv[]) | 86 | int dos2unix_main(int argc, char *argv[]) |
86 | { | 87 | { |
87 | int o; | 88 | int o; |
diff --git a/coreutils/du.c b/coreutils/du.c index a4b3c817e..eceb646d1 100644 --- a/coreutils/du.c +++ b/coreutils/du.c | |||
@@ -143,6 +143,7 @@ static long du(const char * const filename) | |||
143 | return sum; | 143 | return sum; |
144 | } | 144 | } |
145 | 145 | ||
146 | int du_main(int argc, char **argv); | ||
146 | int du_main(int argc, char **argv) | 147 | int du_main(int argc, char **argv) |
147 | { | 148 | { |
148 | long total; | 149 | long total; |
diff --git a/coreutils/echo.c b/coreutils/echo.c index 0c8eac3bc..8270fc006 100644 --- a/coreutils/echo.c +++ b/coreutils/echo.c | |||
@@ -112,6 +112,7 @@ just_echo: | |||
112 | return 0; | 112 | return 0; |
113 | } | 113 | } |
114 | 114 | ||
115 | int echo_main(int argc, char** argv); | ||
115 | int echo_main(int argc, char** argv) | 116 | int echo_main(int argc, char** argv) |
116 | { | 117 | { |
117 | (void)bb_echo(argv); | 118 | (void)bb_echo(argv); |
diff --git a/coreutils/env.c b/coreutils/env.c index e4cad271b..04279f3e0 100644 --- a/coreutils/env.c +++ b/coreutils/env.c | |||
@@ -41,6 +41,7 @@ static const struct option env_long_options[] = { | |||
41 | }; | 41 | }; |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | int env_main(int argc, char** argv); | ||
44 | int env_main(int argc, char** argv) | 45 | int env_main(int argc, char** argv) |
45 | { | 46 | { |
46 | static char *cleanenv[1] = { NULL }; | 47 | static char *cleanenv[1] = { NULL }; |
diff --git a/coreutils/expr.c b/coreutils/expr.c index 469d467bf..62d1f3a8f 100644 --- a/coreutils/expr.c +++ b/coreutils/expr.c | |||
@@ -74,6 +74,7 @@ static int toarith(VALUE * v); | |||
74 | static void freev(VALUE * v); | 74 | static void freev(VALUE * v); |
75 | static void tostring(VALUE * v); | 75 | static void tostring(VALUE * v); |
76 | 76 | ||
77 | int expr_main(int argc, char **argv); | ||
77 | int expr_main(int argc, char **argv) | 78 | int expr_main(int argc, char **argv) |
78 | { | 79 | { |
79 | VALUE *v; | 80 | VALUE *v; |
diff --git a/coreutils/false.c b/coreutils/false.c index 084bc0c1e..2a26e0e28 100644 --- a/coreutils/false.c +++ b/coreutils/false.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <stdlib.h> | 13 | #include <stdlib.h> |
14 | #include "busybox.h" | 14 | #include "busybox.h" |
15 | 15 | ||
16 | int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv); | ||
16 | int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv) | 17 | int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv) |
17 | { | 18 | { |
18 | return EXIT_FAILURE; | 19 | return EXIT_FAILURE; |
diff --git a/coreutils/fold.c b/coreutils/fold.c index 490882f6d..4ce52cf0b 100644 --- a/coreutils/fold.c +++ b/coreutils/fold.c | |||
@@ -38,6 +38,7 @@ static int adjust_column(int column, char c) | |||
38 | return column; | 38 | return column; |
39 | } | 39 | } |
40 | 40 | ||
41 | int fold_main(int argc, char **argv); | ||
41 | int fold_main(int argc, char **argv) | 42 | int fold_main(int argc, char **argv) |
42 | { | 43 | { |
43 | char *w_opt; | 44 | char *w_opt; |
diff --git a/coreutils/head.c b/coreutils/head.c index 59b4d552c..ed1d01d52 100644 --- a/coreutils/head.c +++ b/coreutils/head.c | |||
@@ -31,6 +31,7 @@ static const struct suffix_mult head_suffixes[] = { | |||
31 | 31 | ||
32 | static const char header_fmt_str[] = "\n==> %s <==\n"; | 32 | static const char header_fmt_str[] = "\n==> %s <==\n"; |
33 | 33 | ||
34 | int head_main(int argc, char **argv); | ||
34 | int head_main(int argc, char **argv) | 35 | int head_main(int argc, char **argv) |
35 | { | 36 | { |
36 | unsigned long count = 10; | 37 | unsigned long count = 10; |
diff --git a/coreutils/hostid.c b/coreutils/hostid.c index 65447aa63..51a76c631 100644 --- a/coreutils/hostid.c +++ b/coreutils/hostid.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <unistd.h> | 13 | #include <unistd.h> |
14 | #include "busybox.h" | 14 | #include "busybox.h" |
15 | 15 | ||
16 | int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv); | ||
16 | int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv) | 17 | int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv) |
17 | { | 18 | { |
18 | if (argc > 1) { | 19 | if (argc > 1) { |
diff --git a/coreutils/id.c b/coreutils/id.c index 36007ae55..963ee0566 100644 --- a/coreutils/id.c +++ b/coreutils/id.c | |||
@@ -39,6 +39,7 @@ static short printf_full(unsigned int id, const char *arg, const char prefix) | |||
39 | return status; | 39 | return status; |
40 | } | 40 | } |
41 | 41 | ||
42 | int id_main(int argc, char **argv); | ||
42 | int id_main(int argc, char **argv) | 43 | int id_main(int argc, char **argv) |
43 | { | 44 | { |
44 | struct passwd *p; | 45 | struct passwd *p; |
diff --git a/coreutils/install.c b/coreutils/install.c index c899158aa..dd73fb693 100644 --- a/coreutils/install.c +++ b/coreutils/install.c | |||
@@ -25,6 +25,7 @@ static const struct option install_long_options[] = { | |||
25 | }; | 25 | }; |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | int install_main(int argc, char **argv); | ||
28 | int install_main(int argc, char **argv) | 29 | int install_main(int argc, char **argv) |
29 | { | 30 | { |
30 | struct stat statbuf; | 31 | struct stat statbuf; |
diff --git a/coreutils/length.c b/coreutils/length.c index 6413be007..1dc122cc1 100644 --- a/coreutils/length.c +++ b/coreutils/length.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <stdio.h> | 7 | #include <stdio.h> |
8 | #include "busybox.h" | 8 | #include "busybox.h" |
9 | 9 | ||
10 | int length_main(int argc, char **argv); | ||
10 | int length_main(int argc, char **argv) | 11 | int length_main(int argc, char **argv) |
11 | { | 12 | { |
12 | if ((argc != 2) || (**(++argv) == '-')) { | 13 | if ((argc != 2) || (**(++argv) == '-')) { |
diff --git a/coreutils/ln.c b/coreutils/ln.c index a307e5579..720713475 100644 --- a/coreutils/ln.c +++ b/coreutils/ln.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #define LN_BACKUP 8 | 19 | #define LN_BACKUP 8 |
20 | #define LN_SUFFIX 16 | 20 | #define LN_SUFFIX 16 |
21 | 21 | ||
22 | int ln_main(int argc, char **argv); | ||
22 | int ln_main(int argc, char **argv) | 23 | int ln_main(int argc, char **argv) |
23 | { | 24 | { |
24 | int status = EXIT_SUCCESS; | 25 | int status = EXIT_SUCCESS; |
diff --git a/coreutils/logname.c b/coreutils/logname.c index 695a736c6..743e2291c 100644 --- a/coreutils/logname.c +++ b/coreutils/logname.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <unistd.h> | 25 | #include <unistd.h> |
26 | #include "busybox.h" | 26 | #include "busybox.h" |
27 | 27 | ||
28 | int logname_main(int argc, char ATTRIBUTE_UNUSED **argv); | ||
28 | int logname_main(int argc, char ATTRIBUTE_UNUSED **argv) | 29 | int logname_main(int argc, char ATTRIBUTE_UNUSED **argv) |
29 | { | 30 | { |
30 | const char *p; | 31 | const char *p; |
diff --git a/coreutils/ls.c b/coreutils/ls.c index 067e463ee..798bc8201 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -773,6 +773,7 @@ static const unsigned opt_flags[] = { | |||
773 | }; | 773 | }; |
774 | 774 | ||
775 | 775 | ||
776 | int ls_main(int argc, char **argv); | ||
776 | int ls_main(int argc, char **argv) | 777 | int ls_main(int argc, char **argv) |
777 | { | 778 | { |
778 | struct dnode **dnd; | 779 | struct dnode **dnd; |
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c index d945ce7e0..417e90b00 100644 --- a/coreutils/md5_sha1_sum.c +++ b/coreutils/md5_sha1_sum.c | |||
@@ -78,6 +78,7 @@ static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo) | |||
78 | return hash_value; | 78 | return hash_value; |
79 | } | 79 | } |
80 | 80 | ||
81 | int md5_sha1_sum_main(int argc, char **argv); | ||
81 | int md5_sha1_sum_main(int argc, char **argv) | 82 | int md5_sha1_sum_main(int argc, char **argv) |
82 | { | 83 | { |
83 | int return_value = EXIT_SUCCESS; | 84 | int return_value = EXIT_SUCCESS; |
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index 2cc9c7a4c..67819e784 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c | |||
@@ -29,6 +29,7 @@ static const struct option mkdir_long_options[] = { | |||
29 | }; | 29 | }; |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | int mkdir_main(int argc, char **argv); | ||
32 | int mkdir_main(int argc, char **argv) | 33 | int mkdir_main(int argc, char **argv) |
33 | { | 34 | { |
34 | mode_t mode = (mode_t)(-1); | 35 | mode_t mode = (mode_t)(-1); |
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c index 24d27e7c0..6d8aa413e 100644 --- a/coreutils/mkfifo.c +++ b/coreutils/mkfifo.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include "busybox.h" | 16 | #include "busybox.h" |
17 | #include "libcoreutils/coreutils.h" | 17 | #include "libcoreutils/coreutils.h" |
18 | 18 | ||
19 | int mkfifo_main(int argc, char **argv); | ||
19 | int mkfifo_main(int argc, char **argv) | 20 | int mkfifo_main(int argc, char **argv) |
20 | { | 21 | { |
21 | mode_t mode; | 22 | mode_t mode; |
diff --git a/coreutils/mknod.c b/coreutils/mknod.c index 8ca511cd5..6fa6d8353 100644 --- a/coreutils/mknod.c +++ b/coreutils/mknod.c | |||
@@ -17,6 +17,7 @@ | |||
17 | static const char modes_chars[] = { 'p', 'c', 'u', 'b', 0, 1, 1, 2 }; | 17 | static const char modes_chars[] = { 'p', 'c', 'u', 'b', 0, 1, 1, 2 }; |
18 | static const mode_t modes_cubp[] = { S_IFIFO, S_IFCHR, S_IFBLK }; | 18 | static const mode_t modes_cubp[] = { S_IFIFO, S_IFCHR, S_IFBLK }; |
19 | 19 | ||
20 | int mknod_main(int argc, char **argv); | ||
20 | int mknod_main(int argc, char **argv) | 21 | int mknod_main(int argc, char **argv) |
21 | { | 22 | { |
22 | mode_t mode; | 23 | mode_t mode; |
diff --git a/coreutils/mv.c b/coreutils/mv.c index 353124b35..7d4905fc9 100644 --- a/coreutils/mv.c +++ b/coreutils/mv.c | |||
@@ -35,6 +35,7 @@ static const struct option mv_long_options[] = { | |||
35 | 35 | ||
36 | static const char fmt[] = "cannot overwrite %sdirectory with %sdirectory"; | 36 | static const char fmt[] = "cannot overwrite %sdirectory with %sdirectory"; |
37 | 37 | ||
38 | int mv_main(int argc, char **argv); | ||
38 | int mv_main(int argc, char **argv) | 39 | int mv_main(int argc, char **argv) |
39 | { | 40 | { |
40 | struct stat dest_stat; | 41 | struct stat dest_stat; |
diff --git a/coreutils/nice.c b/coreutils/nice.c index 293861842..b7bff6a52 100644 --- a/coreutils/nice.c +++ b/coreutils/nice.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <sys/resource.h> | 10 | #include <sys/resource.h> |
11 | #include "busybox.h" | 11 | #include "busybox.h" |
12 | 12 | ||
13 | int nice_main(int argc, char **argv); | ||
13 | int nice_main(int argc, char **argv) | 14 | int nice_main(int argc, char **argv) |
14 | { | 15 | { |
15 | int old_priority, adjustment; | 16 | int old_priority, adjustment; |
diff --git a/coreutils/nohup.c b/coreutils/nohup.c index 317d2a8ae..a9944b7f4 100644 --- a/coreutils/nohup.c +++ b/coreutils/nohup.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include "busybox.h" | 13 | #include "busybox.h" |
14 | 14 | ||
15 | int nohup_main(int argc, char **argv); | ||
15 | int nohup_main(int argc, char **argv) | 16 | int nohup_main(int argc, char **argv) |
16 | { | 17 | { |
17 | int nullfd; | 18 | int nullfd; |
diff --git a/coreutils/od.c b/coreutils/od.c index ab92dacbb..0de9def5a 100644 --- a/coreutils/od.c +++ b/coreutils/od.c | |||
@@ -156,6 +156,7 @@ static const char od_o2si[] = { | |||
156 | 0xb, 1, 8, 9, | 156 | 0xb, 1, 8, 9, |
157 | }; | 157 | }; |
158 | 158 | ||
159 | int od_main(int argc, char **argv); | ||
159 | int od_main(int argc, char **argv) | 160 | int od_main(int argc, char **argv) |
160 | { | 161 | { |
161 | int ch; | 162 | int ch; |
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c index fae41afae..f060c0ace 100644 --- a/coreutils/od_bloaty.c +++ b/coreutils/od_bloaty.c | |||
@@ -1207,8 +1207,8 @@ dump_strings(void) | |||
1207 | check_and_close(); | 1207 | check_and_close(); |
1208 | } | 1208 | } |
1209 | 1209 | ||
1210 | int | 1210 | int od_main(int argc, char **argv); |
1211 | od_main(int argc, char **argv) | 1211 | int od_main(int argc, char **argv) |
1212 | { | 1212 | { |
1213 | static const struct suffix_mult bkm[] = { | 1213 | static const struct suffix_mult bkm[] = { |
1214 | { "b", 512 }, | 1214 | { "b", 512 }, |
diff --git a/coreutils/printenv.c b/coreutils/printenv.c index ec50f7151..1d41eeb7b 100644 --- a/coreutils/printenv.c +++ b/coreutils/printenv.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <stdlib.h> | 13 | #include <stdlib.h> |
14 | #include "busybox.h" | 14 | #include "busybox.h" |
15 | 15 | ||
16 | int printenv_main(int argc, char **argv); | ||
16 | int printenv_main(int argc, char **argv) | 17 | int printenv_main(int argc, char **argv) |
17 | { | 18 | { |
18 | extern char **environ; | 19 | extern char **environ; |
diff --git a/coreutils/printf.c b/coreutils/printf.c index 924499b29..0180d0e5a 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c | |||
@@ -109,6 +109,7 @@ static void print_esc_string(char *str) | |||
109 | } | 109 | } |
110 | } | 110 | } |
111 | 111 | ||
112 | int printf_main(int argc, char **argv); | ||
112 | int printf_main(int argc, char **argv) | 113 | int printf_main(int argc, char **argv) |
113 | { | 114 | { |
114 | char *format; | 115 | char *format; |
diff --git a/coreutils/pwd.c b/coreutils/pwd.c index bd36d627e..b4599b4f3 100644 --- a/coreutils/pwd.c +++ b/coreutils/pwd.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <stdlib.h> | 11 | #include <stdlib.h> |
12 | #include "busybox.h" | 12 | #include "busybox.h" |
13 | 13 | ||
14 | int pwd_main(int argc, char **argv); | ||
14 | int pwd_main(int argc, char **argv) | 15 | int pwd_main(int argc, char **argv) |
15 | { | 16 | { |
16 | char *buf; | 17 | char *buf; |
diff --git a/coreutils/realpath.c b/coreutils/realpath.c index 7fac471eb..b3f7e4957 100644 --- a/coreutils/realpath.c +++ b/coreutils/realpath.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include "busybox.h" | 13 | #include "busybox.h" |
14 | 14 | ||
15 | int realpath_main(int argc, char **argv); | ||
15 | int realpath_main(int argc, char **argv) | 16 | int realpath_main(int argc, char **argv) |
16 | { | 17 | { |
17 | int retval = EXIT_SUCCESS; | 18 | int retval = EXIT_SUCCESS; |
diff --git a/coreutils/rm.c b/coreutils/rm.c index 5df7d5f65..1883feed8 100644 --- a/coreutils/rm.c +++ b/coreutils/rm.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <unistd.h> | 18 | #include <unistd.h> |
19 | #include "busybox.h" | 19 | #include "busybox.h" |
20 | 20 | ||
21 | int rm_main(int argc, char **argv); | ||
21 | int rm_main(int argc, char **argv) | 22 | int rm_main(int argc, char **argv) |
22 | { | 23 | { |
23 | int status = 0; | 24 | int status = 0; |
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c index c61bae795..8cbd6f1fa 100644 --- a/coreutils/rmdir.c +++ b/coreutils/rmdir.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <libgen.h> | 15 | #include <libgen.h> |
16 | #include "busybox.h" | 16 | #include "busybox.h" |
17 | 17 | ||
18 | int rmdir_main(int argc, char **argv); | ||
18 | int rmdir_main(int argc, char **argv) | 19 | int rmdir_main(int argc, char **argv) |
19 | { | 20 | { |
20 | int status = EXIT_SUCCESS; | 21 | int status = EXIT_SUCCESS; |
diff --git a/coreutils/seq.c b/coreutils/seq.c index f2b4706f2..e81a4660a 100644 --- a/coreutils/seq.c +++ b/coreutils/seq.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <stdlib.h> | 11 | #include <stdlib.h> |
12 | #include "busybox.h" | 12 | #include "busybox.h" |
13 | 13 | ||
14 | int seq_main(int argc, char **argv); | ||
14 | int seq_main(int argc, char **argv) | 15 | int seq_main(int argc, char **argv) |
15 | { | 16 | { |
16 | double last, first, increment, i; | 17 | double last, first, increment, i; |
diff --git a/coreutils/sleep.c b/coreutils/sleep.c index e32e2157d..b89b0fe9c 100644 --- a/coreutils/sleep.c +++ b/coreutils/sleep.c | |||
@@ -33,6 +33,7 @@ static const struct suffix_mult sfx[] = { | |||
33 | }; | 33 | }; |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | int sleep_main(int argc, char **argv); | ||
36 | int sleep_main(int argc, char **argv) | 37 | int sleep_main(int argc, char **argv) |
37 | { | 38 | { |
38 | unsigned int duration; | 39 | unsigned int duration; |
diff --git a/coreutils/sort.c b/coreutils/sort.c index 29cadf5f6..e2c7b1dbf 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c | |||
@@ -271,6 +271,7 @@ static unsigned str2u(char **str) | |||
271 | } | 271 | } |
272 | #endif | 272 | #endif |
273 | 273 | ||
274 | int sort_main(int argc, char **argv); | ||
274 | int sort_main(int argc, char **argv) | 275 | int sort_main(int argc, char **argv) |
275 | { | 276 | { |
276 | FILE *fp, *outfile = stdout; | 277 | FILE *fp, *outfile = stdout; |
diff --git a/coreutils/stat.c b/coreutils/stat.c index 31dd6624e..ff14a1599 100644 --- a/coreutils/stat.c +++ b/coreutils/stat.c | |||
@@ -515,6 +515,7 @@ static int do_stat(char const *filename, char const *format) | |||
515 | return 1; | 515 | return 1; |
516 | } | 516 | } |
517 | 517 | ||
518 | int stat_main(int argc, char **argv); | ||
518 | int stat_main(int argc, char **argv) | 519 | int stat_main(int argc, char **argv) |
519 | { | 520 | { |
520 | int i; | 521 | int i; |
diff --git a/coreutils/stty.c b/coreutils/stty.c index 4e665bcb7..c354aac9c 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
@@ -907,6 +907,7 @@ static void set_control_char_or_die(const struct control_info *info, | |||
907 | #define STTY_verbose_output (1<<2) | 907 | #define STTY_verbose_output (1<<2) |
908 | #define STTY_recoverable_output (1<<3) | 908 | #define STTY_recoverable_output (1<<3) |
909 | #define STTY_noargs (1<<4) | 909 | #define STTY_noargs (1<<4) |
910 | int stty_main(int argc, char **argv); | ||
910 | int stty_main(int argc, char **argv) | 911 | int stty_main(int argc, char **argv) |
911 | { | 912 | { |
912 | struct termios mode; | 913 | struct termios mode; |
diff --git a/coreutils/sum.c b/coreutils/sum.c index d62f2cfde..9327ca55e 100644 --- a/coreutils/sum.c +++ b/coreutils/sum.c | |||
@@ -74,6 +74,7 @@ static unsigned sum_file(const char *file, const unsigned type) | |||
74 | #undef buf | 74 | #undef buf |
75 | } | 75 | } |
76 | 76 | ||
77 | int sum_main(int argc, char **argv); | ||
77 | int sum_main(int argc, char **argv) | 78 | int sum_main(int argc, char **argv) |
78 | { | 79 | { |
79 | unsigned n; | 80 | unsigned n; |
diff --git a/coreutils/sync.c b/coreutils/sync.c index 59f0b504a..536c57a17 100644 --- a/coreutils/sync.c +++ b/coreutils/sync.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <unistd.h> | 13 | #include <unistd.h> |
14 | #include "busybox.h" | 14 | #include "busybox.h" |
15 | 15 | ||
16 | int sync_main(int argc, char **argv); | ||
16 | int sync_main(int argc, char **argv) | 17 | int sync_main(int argc, char **argv) |
17 | { | 18 | { |
18 | bb_warn_ignoring_args(argc - 1); | 19 | bb_warn_ignoring_args(argc - 1); |
diff --git a/coreutils/tail.c b/coreutils/tail.c index 2a1645309..52bacb7ed 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c | |||
@@ -68,6 +68,7 @@ static unsigned eat_num(const char *p) { | |||
68 | return xatou_sfx(p, tail_suffixes); | 68 | return xatou_sfx(p, tail_suffixes); |
69 | } | 69 | } |
70 | 70 | ||
71 | int tail_main(int argc, char **argv); | ||
71 | int tail_main(int argc, char **argv) | 72 | int tail_main(int argc, char **argv) |
72 | { | 73 | { |
73 | unsigned count = 10; | 74 | unsigned count = 10; |
diff --git a/coreutils/tee.c b/coreutils/tee.c index 248fd1445..338232ce9 100644 --- a/coreutils/tee.c +++ b/coreutils/tee.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include "busybox.h" | 13 | #include "busybox.h" |
14 | #include <signal.h> | 14 | #include <signal.h> |
15 | 15 | ||
16 | int tee_main(int argc, char **argv); | ||
16 | int tee_main(int argc, char **argv) | 17 | int tee_main(int argc, char **argv) |
17 | { | 18 | { |
18 | const char *mode = "w\0a"; | 19 | const char *mode = "w\0a"; |
diff --git a/coreutils/test.c b/coreutils/test.c index d3d760467..6e0d5d38e 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
@@ -578,6 +578,7 @@ static int is_a_group_member(gid_t gid) | |||
578 | 578 | ||
579 | /* applet entry point */ | 579 | /* applet entry point */ |
580 | 580 | ||
581 | int test_main(int argc, char **argv); | ||
581 | int test_main(int argc, char **argv) | 582 | int test_main(int argc, char **argv) |
582 | { | 583 | { |
583 | return bb_test(argc, argv); | 584 | return bb_test(argc, argv); |
diff --git a/coreutils/touch.c b/coreutils/touch.c index 72bf904f8..ae4e689f1 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <stdlib.h> | 26 | #include <stdlib.h> |
27 | #include "busybox.h" | 27 | #include "busybox.h" |
28 | 28 | ||
29 | int touch_main(int argc, char **argv); | ||
29 | int touch_main(int argc, char **argv) | 30 | int touch_main(int argc, char **argv) |
30 | { | 31 | { |
31 | int fd; | 32 | int fd; |
diff --git a/coreutils/tr.c b/coreutils/tr.c index 237ade047..cea3b05b6 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c | |||
@@ -193,6 +193,7 @@ static int complement(char *buffer, int buffer_len) | |||
193 | return ix; | 193 | return ix; |
194 | } | 194 | } |
195 | 195 | ||
196 | int tr_main(int argc, char **argv); | ||
196 | int tr_main(int argc, char **argv) | 197 | int tr_main(int argc, char **argv) |
197 | { | 198 | { |
198 | unsigned char *ptr; | 199 | unsigned char *ptr; |
diff --git a/coreutils/true.c b/coreutils/true.c index 388e897c0..b2f3a9bad 100644 --- a/coreutils/true.c +++ b/coreutils/true.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <stdlib.h> | 13 | #include <stdlib.h> |
14 | #include "busybox.h" | 14 | #include "busybox.h" |
15 | 15 | ||
16 | int true_main(int argc, char **argv); | ||
16 | int true_main(int argc, char **argv) | 17 | int true_main(int argc, char **argv) |
17 | { | 18 | { |
18 | return EXIT_SUCCESS; | 19 | return EXIT_SUCCESS; |
diff --git a/coreutils/tty.c b/coreutils/tty.c index fee4b8b9f..c28aa33d7 100644 --- a/coreutils/tty.c +++ b/coreutils/tty.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <unistd.h> | 15 | #include <unistd.h> |
16 | #include "busybox.h" | 16 | #include "busybox.h" |
17 | 17 | ||
18 | int tty_main(int argc, char **argv); | ||
18 | int tty_main(int argc, char **argv) | 19 | int tty_main(int argc, char **argv) |
19 | { | 20 | { |
20 | const char *s; | 21 | const char *s; |
diff --git a/coreutils/uname.c b/coreutils/uname.c index 5a3eafe92..2faa89321 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c | |||
@@ -54,6 +54,7 @@ static const unsigned short int utsname_offset[] = { | |||
54 | offsetof(uname_info_t,processor) | 54 | offsetof(uname_info_t,processor) |
55 | }; | 55 | }; |
56 | 56 | ||
57 | int uname_main(int argc, char **argv); | ||
57 | int uname_main(int argc, char **argv) | 58 | int uname_main(int argc, char **argv) |
58 | { | 59 | { |
59 | uname_info_t uname_info; | 60 | uname_info_t uname_info; |
diff --git a/coreutils/uniq.c b/coreutils/uniq.c index 100f2be00..0cc0c83b3 100644 --- a/coreutils/uniq.c +++ b/coreutils/uniq.c | |||
@@ -26,6 +26,7 @@ static FILE *xgetoptfile_uniq_s(char **argv, int read0write2) | |||
26 | return (read0write2) ? stdout : stdin; | 26 | return (read0write2) ? stdout : stdin; |
27 | } | 27 | } |
28 | 28 | ||
29 | int uniq_main(int argc, char **argv); | ||
29 | int uniq_main(int argc, char **argv) | 30 | int uniq_main(int argc, char **argv) |
30 | { | 31 | { |
31 | FILE *in, *out; | 32 | FILE *in, *out; |
diff --git a/coreutils/usleep.c b/coreutils/usleep.c index de473a7b2..7dd914638 100644 --- a/coreutils/usleep.c +++ b/coreutils/usleep.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <unistd.h> | 14 | #include <unistd.h> |
15 | #include "busybox.h" | 15 | #include "busybox.h" |
16 | 16 | ||
17 | int usleep_main(int argc, char **argv); | ||
17 | int usleep_main(int argc, char **argv) | 18 | int usleep_main(int argc, char **argv) |
18 | { | 19 | { |
19 | if (argc != 2) { | 20 | if (argc != 2) { |
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index 92272a967..c195a3e6f 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c | |||
@@ -123,6 +123,7 @@ static void read_base64(FILE *src_stream, FILE *dst_stream) | |||
123 | } | 123 | } |
124 | } | 124 | } |
125 | 125 | ||
126 | int uudecode_main(int argc, char **argv); | ||
126 | int uudecode_main(int argc, char **argv) | 127 | int uudecode_main(int argc, char **argv) |
127 | { | 128 | { |
128 | FILE *src_stream; | 129 | FILE *src_stream; |
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c index e8f8d541c..3207d7296 100644 --- a/coreutils/uuencode.c +++ b/coreutils/uuencode.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #define SRC_BUF_SIZE 45 // This *MUST* be a multiple of 3 | 14 | #define SRC_BUF_SIZE 45 // This *MUST* be a multiple of 3 |
15 | #define DST_BUF_SIZE 4 * ((SRC_BUF_SIZE + 2) / 3) | 15 | #define DST_BUF_SIZE 4 * ((SRC_BUF_SIZE + 2) / 3) |
16 | int uuencode_main(int argc, char **argv); | ||
16 | int uuencode_main(int argc, char **argv) | 17 | int uuencode_main(int argc, char **argv) |
17 | { | 18 | { |
18 | const size_t src_buf_size = SRC_BUF_SIZE; | 19 | const size_t src_buf_size = SRC_BUF_SIZE; |
diff --git a/coreutils/watch.c b/coreutils/watch.c index 81856c867..60a4a71ce 100644 --- a/coreutils/watch.c +++ b/coreutils/watch.c | |||
@@ -23,6 +23,7 @@ | |||
23 | // | 23 | // |
24 | // (procps 3.x and procps 2.x are forks, not newer/older versions of the same) | 24 | // (procps 3.x and procps 2.x are forks, not newer/older versions of the same) |
25 | 25 | ||
26 | int watch_main(int argc, char **argv); | ||
26 | int watch_main(int argc, char **argv) | 27 | int watch_main(int argc, char **argv) |
27 | { | 28 | { |
28 | unsigned opt; | 29 | unsigned opt; |
diff --git a/coreutils/wc.c b/coreutils/wc.c index d89cb45f6..926b3ac19 100644 --- a/coreutils/wc.c +++ b/coreutils/wc.c | |||
@@ -68,6 +68,7 @@ enum { | |||
68 | WC_LENGTH = 3 | 68 | WC_LENGTH = 3 |
69 | }; | 69 | }; |
70 | 70 | ||
71 | int wc_main(int argc, char **argv); | ||
71 | int wc_main(int argc, char **argv) | 72 | int wc_main(int argc, char **argv) |
72 | { | 73 | { |
73 | FILE *fp; | 74 | FILE *fp; |
diff --git a/coreutils/who.c b/coreutils/who.c index 4cd42652b..25d35fad9 100644 --- a/coreutils/who.c +++ b/coreutils/who.c | |||
@@ -38,6 +38,7 @@ static const char * idle_string (time_t t) | |||
38 | return "old"; | 38 | return "old"; |
39 | } | 39 | } |
40 | 40 | ||
41 | int who_main(int argc, char **argv); | ||
41 | int who_main(int argc, char **argv) | 42 | int who_main(int argc, char **argv) |
42 | { | 43 | { |
43 | struct utmp *ut; | 44 | struct utmp *ut; |
diff --git a/coreutils/whoami.c b/coreutils/whoami.c index df714f22c..3185817b6 100644 --- a/coreutils/whoami.c +++ b/coreutils/whoami.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <unistd.h> | 14 | #include <unistd.h> |
15 | #include "busybox.h" | 15 | #include "busybox.h" |
16 | 16 | ||
17 | int whoami_main(int argc, char **argv); | ||
17 | int whoami_main(int argc, char **argv) | 18 | int whoami_main(int argc, char **argv) |
18 | { | 19 | { |
19 | if (argc > 1) | 20 | if (argc > 1) |
diff --git a/coreutils/yes.c b/coreutils/yes.c index fc6e611e6..2611c3e82 100644 --- a/coreutils/yes.c +++ b/coreutils/yes.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include "busybox.h" | 17 | #include "busybox.h" |
18 | 18 | ||
19 | int yes_main(int argc, char **argv); | ||
19 | int yes_main(int argc, char **argv) | 20 | int yes_main(int argc, char **argv) |
20 | { | 21 | { |
21 | static const char fmt_str[] = " %s"; | 22 | static const char fmt_str[] = " %s"; |
diff --git a/debianutils/mktemp.c b/debianutils/mktemp.c index d47d5a0bf..ce5bda515 100644 --- a/debianutils/mktemp.c +++ b/debianutils/mktemp.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <unistd.h> | 16 | #include <unistd.h> |
17 | #include <stdlib.h> | 17 | #include <stdlib.h> |
18 | 18 | ||
19 | int mktemp_main(int argc, char **argv); | ||
19 | int mktemp_main(int argc, char **argv) | 20 | int mktemp_main(int argc, char **argv) |
20 | { | 21 | { |
21 | unsigned long flags = getopt32(argc, argv, "dqt"); | 22 | unsigned long flags = getopt32(argc, argv, "dqt"); |
diff --git a/debianutils/pipe_progress.c b/debianutils/pipe_progress.c index 75d26e20f..51a017c98 100644 --- a/debianutils/pipe_progress.c +++ b/debianutils/pipe_progress.c | |||
@@ -18,6 +18,7 @@ | |||
18 | /* Read a block of data from stdin, write it to stdout. | 18 | /* Read a block of data from stdin, write it to stdout. |
19 | * Activity is indicated by a '.' to stderr | 19 | * Activity is indicated by a '.' to stderr |
20 | */ | 20 | */ |
21 | int pipe_progress_main(int argc, char **argv); | ||
21 | int pipe_progress_main(int argc, char **argv) | 22 | int pipe_progress_main(int argc, char **argv) |
22 | { | 23 | { |
23 | RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE); | 24 | RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE); |
diff --git a/debianutils/readlink.c b/debianutils/readlink.c index 400259080..8f9cfe431 100644 --- a/debianutils/readlink.c +++ b/debianutils/readlink.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <stdlib.h> | 13 | #include <stdlib.h> |
14 | #include <getopt.h> | 14 | #include <getopt.h> |
15 | 15 | ||
16 | int readlink_main(int argc, char **argv); | ||
16 | int readlink_main(int argc, char **argv) | 17 | int readlink_main(int argc, char **argv) |
17 | { | 18 | { |
18 | char *buf; | 19 | char *buf; |
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c index 2b3b18854..a864a0505 100644 --- a/debianutils/run_parts.c +++ b/debianutils/run_parts.c | |||
@@ -142,6 +142,7 @@ static int run_parts(char **args, const unsigned char test_mode) | |||
142 | 142 | ||
143 | /* run_parts_main */ | 143 | /* run_parts_main */ |
144 | /* Process options */ | 144 | /* Process options */ |
145 | int run_parts_main(int argc, char **argv); | ||
145 | int run_parts_main(int argc, char **argv) | 146 | int run_parts_main(int argc, char **argv) |
146 | { | 147 | { |
147 | char **args = xmalloc(2 * sizeof(char *)); | 148 | char **args = xmalloc(2 * sizeof(char *)); |
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c index 9a865f6c6..eb2427a50 100644 --- a/debianutils/start_stop_daemon.c +++ b/debianutils/start_stop_daemon.c | |||
@@ -230,6 +230,7 @@ enum { | |||
230 | OPT_NICELEVEL = 0x80 * ENABLE_FEATURE_START_STOP_DAEMON_FANCY, | 230 | OPT_NICELEVEL = 0x80 * ENABLE_FEATURE_START_STOP_DAEMON_FANCY, |
231 | }; | 231 | }; |
232 | 232 | ||
233 | int start_stop_daemon_main(int argc, char **argv); | ||
233 | int start_stop_daemon_main(int argc, char **argv) | 234 | int start_stop_daemon_main(int argc, char **argv) |
234 | { | 235 | { |
235 | unsigned opt; | 236 | unsigned opt; |
diff --git a/debianutils/which.c b/debianutils/which.c index 79b2a4f83..02992d0f6 100644 --- a/debianutils/which.c +++ b/debianutils/which.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include "busybox.h" | 13 | #include "busybox.h" |
14 | 14 | ||
15 | int which_main(int argc, char **argv); | ||
15 | int which_main(int argc, char **argv) | 16 | int which_main(int argc, char **argv) |
16 | { | 17 | { |
17 | int status = EXIT_SUCCESS; | 18 | int status = EXIT_SUCCESS; |
diff --git a/docs/new-applet-HOWTO.txt b/docs/new-applet-HOWTO.txt index 1c2383f35..b1e103572 100644 --- a/docs/new-applet-HOWTO.txt +++ b/docs/new-applet-HOWTO.txt | |||
@@ -35,6 +35,7 @@ For a new applet mu, here is the code that would go in mu.c: | |||
35 | #include "busybox.h" | 35 | #include "busybox.h" |
36 | #include <other.h> | 36 | #include <other.h> |
37 | 37 | ||
38 | int mu_main(int argc, char **argv); | ||
38 | int mu_main(int argc, char **argv) | 39 | int mu_main(int argc, char **argv) |
39 | { | 40 | { |
40 | int fd; | 41 | int fd; |
diff --git a/e2fsprogs/chattr.c b/e2fsprogs/chattr.c index f46646d71..1b7942e1f 100644 --- a/e2fsprogs/chattr.c +++ b/e2fsprogs/chattr.c | |||
@@ -147,6 +147,7 @@ static void change_attributes(const char *name) | |||
147 | iterate_on_dir(name, chattr_dir_proc, NULL); | 147 | iterate_on_dir(name, chattr_dir_proc, NULL); |
148 | } | 148 | } |
149 | 149 | ||
150 | int chattr_main(int argc, char **argv); | ||
150 | int chattr_main(int argc, char **argv) | 151 | int chattr_main(int argc, char **argv) |
151 | { | 152 | { |
152 | char *arg; | 153 | char *arg; |
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c index 8cbfc89fb..9ec31d2a3 100644 --- a/e2fsprogs/fsck.c +++ b/e2fsprogs/fsck.c | |||
@@ -1173,6 +1173,7 @@ static void signal_cancel(int sig ATTRIBUTE_UNUSED) | |||
1173 | cancel_requested = 1; | 1173 | cancel_requested = 1; |
1174 | } | 1174 | } |
1175 | 1175 | ||
1176 | int fsck_main(int argc, char *argv[]); | ||
1176 | int fsck_main(int argc, char *argv[]) | 1177 | int fsck_main(int argc, char *argv[]) |
1177 | { | 1178 | { |
1178 | int i, status = 0; | 1179 | int i, status = 0; |
diff --git a/e2fsprogs/lsattr.c b/e2fsprogs/lsattr.c index f317b047e..8945b53e0 100644 --- a/e2fsprogs/lsattr.c +++ b/e2fsprogs/lsattr.c | |||
@@ -98,6 +98,7 @@ static void lsattr_args(const char *name) | |||
98 | } | 98 | } |
99 | } | 99 | } |
100 | 100 | ||
101 | int lsattr_main(int argc, char **argv); | ||
101 | int lsattr_main(int argc, char **argv) | 102 | int lsattr_main(int argc, char **argv) |
102 | { | 103 | { |
103 | getopt32(argc, argv, "Radlv"); | 104 | getopt32(argc, argv, "Radlv"); |
diff --git a/e2fsprogs/old_e2fsprogs/chattr.c b/e2fsprogs/old_e2fsprogs/chattr.c index 4848e1e1a..8f62a5d10 100644 --- a/e2fsprogs/old_e2fsprogs/chattr.c +++ b/e2fsprogs/old_e2fsprogs/chattr.c | |||
@@ -170,6 +170,7 @@ static int chattr_dir_proc(const char *dir_name, struct dirent *de, | |||
170 | return 0; | 170 | return 0; |
171 | } | 171 | } |
172 | 172 | ||
173 | int chattr_main(int argc, char **argv); | ||
173 | int chattr_main(int argc, char **argv) | 174 | int chattr_main(int argc, char **argv) |
174 | { | 175 | { |
175 | int i; | 176 | int i; |
diff --git a/e2fsprogs/old_e2fsprogs/e2fsck.c b/e2fsprogs/old_e2fsprogs/e2fsck.c index 408b2758d..d506db2ac 100644 --- a/e2fsprogs/old_e2fsprogs/e2fsck.c +++ b/e2fsprogs/old_e2fsprogs/e2fsck.c | |||
@@ -13207,6 +13207,7 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx) | |||
13207 | static const char my_ver_string[] = E2FSPROGS_VERSION; | 13207 | static const char my_ver_string[] = E2FSPROGS_VERSION; |
13208 | static const char my_ver_date[] = E2FSPROGS_DATE; | 13208 | static const char my_ver_date[] = E2FSPROGS_DATE; |
13209 | 13209 | ||
13210 | int e2fsck_main (int argc, char *argv[]); | ||
13210 | int e2fsck_main (int argc, char *argv[]) | 13211 | int e2fsck_main (int argc, char *argv[]) |
13211 | { | 13212 | { |
13212 | errcode_t retval; | 13213 | errcode_t retval; |
diff --git a/e2fsprogs/old_e2fsprogs/fsck.c b/e2fsprogs/old_e2fsprogs/fsck.c index da66250f1..ce2a9688f 100644 --- a/e2fsprogs/old_e2fsprogs/fsck.c +++ b/e2fsprogs/old_e2fsprogs/fsck.c | |||
@@ -1322,6 +1322,7 @@ static void PRS(int argc, char *argv[]) | |||
1322 | max_running = atoi(tmp); | 1322 | max_running = atoi(tmp); |
1323 | } | 1323 | } |
1324 | 1324 | ||
1325 | int fsck_main(int argc, char *argv[]); | ||
1325 | int fsck_main(int argc, char *argv[]) | 1326 | int fsck_main(int argc, char *argv[]) |
1326 | { | 1327 | { |
1327 | int i, status = 0; | 1328 | int i, status = 0; |
diff --git a/e2fsprogs/old_e2fsprogs/lsattr.c b/e2fsprogs/old_e2fsprogs/lsattr.c index eb28fcbab..b418f6bad 100644 --- a/e2fsprogs/old_e2fsprogs/lsattr.c +++ b/e2fsprogs/old_e2fsprogs/lsattr.c | |||
@@ -112,6 +112,7 @@ static int lsattr_dir_proc(const char *dir_name, struct dirent *de, | |||
112 | return 0; | 112 | return 0; |
113 | } | 113 | } |
114 | 114 | ||
115 | int lsattr_main(int argc, char **argv); | ||
115 | int lsattr_main(int argc, char **argv) | 116 | int lsattr_main(int argc, char **argv) |
116 | { | 117 | { |
117 | int i; | 118 | int i; |
diff --git a/e2fsprogs/old_e2fsprogs/mke2fs.c b/e2fsprogs/old_e2fsprogs/mke2fs.c index f25ecfb6c..45a67239e 100644 --- a/e2fsprogs/old_e2fsprogs/mke2fs.c +++ b/e2fsprogs/old_e2fsprogs/mke2fs.c | |||
@@ -1176,6 +1176,7 @@ static void mke2fs_clean_up(void) | |||
1176 | if (ENABLE_FEATURE_CLEAN_UP && journal_device) free(journal_device); | 1176 | if (ENABLE_FEATURE_CLEAN_UP && journal_device) free(journal_device); |
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | int mke2fs_main (int argc, char *argv[]); | ||
1179 | int mke2fs_main (int argc, char *argv[]) | 1180 | int mke2fs_main (int argc, char *argv[]) |
1180 | { | 1181 | { |
1181 | errcode_t retval; | 1182 | errcode_t retval; |
diff --git a/e2fsprogs/old_e2fsprogs/tune2fs.c b/e2fsprogs/old_e2fsprogs/tune2fs.c index c4e084ecd..12af006da 100644 --- a/e2fsprogs/old_e2fsprogs/tune2fs.c +++ b/e2fsprogs/old_e2fsprogs/tune2fs.c | |||
@@ -578,6 +578,7 @@ static void tune2fs_clean_up(void) | |||
578 | if (ENABLE_FEATURE_CLEAN_UP && journal_device) free(journal_device); | 578 | if (ENABLE_FEATURE_CLEAN_UP && journal_device) free(journal_device); |
579 | } | 579 | } |
580 | 580 | ||
581 | int tune2fs_main(int argc, char **argv); | ||
581 | int tune2fs_main(int argc, char **argv) | 582 | int tune2fs_main(int argc, char **argv) |
582 | { | 583 | { |
583 | errcode_t retval; | 584 | errcode_t retval; |
diff --git a/editors/awk.c b/editors/awk.c index ae7ca23d4..9af6ecc5b 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -2644,6 +2644,7 @@ static rstream *next_input_file(void) | |||
2644 | return &rsm; | 2644 | return &rsm; |
2645 | } | 2645 | } |
2646 | 2646 | ||
2647 | int awk_main(int argc, char **argv); | ||
2647 | int awk_main(int argc, char **argv) | 2648 | int awk_main(int argc, char **argv) |
2648 | { | 2649 | { |
2649 | unsigned opt; | 2650 | unsigned opt; |
diff --git a/editors/ed.c b/editors/ed.c index 5a48fbe75..42adca409 100644 --- a/editors/ed.c +++ b/editors/ed.c | |||
@@ -40,6 +40,7 @@ static LINE *findLine(int num); | |||
40 | 40 | ||
41 | static int findString(const LINE *lp, const char * str, int len, int offset); | 41 | static int findString(const LINE *lp, const char * str, int len, int offset); |
42 | 42 | ||
43 | int ed_main(int argc, char **argv); | ||
43 | int ed_main(int argc, char **argv) | 44 | int ed_main(int argc, char **argv) |
44 | { | 45 | { |
45 | if (!initEdit()) | 46 | if (!initEdit()) |
diff --git a/editors/patch.c b/editors/patch.c index f8d7605c0..2c908040f 100644 --- a/editors/patch.c +++ b/editors/patch.c | |||
@@ -75,6 +75,7 @@ static int file_doesnt_exist(const char *filename) | |||
75 | return stat(filename, &statbuf); | 75 | return stat(filename, &statbuf); |
76 | } | 76 | } |
77 | 77 | ||
78 | int patch_main(int argc, char **argv); | ||
78 | int patch_main(int argc, char **argv) | 79 | int patch_main(int argc, char **argv) |
79 | { | 80 | { |
80 | int patch_level = -1; | 81 | int patch_level = -1; |
diff --git a/editors/sed.c b/editors/sed.c index 1572c74ba..b8f00c0c9 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -1215,6 +1215,7 @@ static void add_files_link(llist_t *opt_f) | |||
1215 | free(opt_f); | 1215 | free(opt_f); |
1216 | } | 1216 | } |
1217 | 1217 | ||
1218 | int sed_main(int argc, char **argv); | ||
1218 | int sed_main(int argc, char **argv) | 1219 | int sed_main(int argc, char **argv) |
1219 | { | 1220 | { |
1220 | enum { | 1221 | enum { |
diff --git a/editors/vi.c b/editors/vi.c index 46181cf60..45a80517d 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -264,6 +264,7 @@ static void write1(const char *out) | |||
264 | fputs(out, stdout); | 264 | fputs(out, stdout); |
265 | } | 265 | } |
266 | 266 | ||
267 | int vi_main(int argc, char **argv); | ||
267 | int vi_main(int argc, char **argv) | 268 | int vi_main(int argc, char **argv) |
268 | { | 269 | { |
269 | int c; | 270 | int c; |
diff --git a/findutils/find.c b/findutils/find.c index d71af9ca9..b4ef7cbaa 100644 --- a/findutils/find.c +++ b/findutils/find.c | |||
@@ -543,6 +543,7 @@ static action*** parse_params(char **argv) | |||
543 | } | 543 | } |
544 | 544 | ||
545 | 545 | ||
546 | int find_main(int argc, char **argv); | ||
546 | int find_main(int argc, char **argv) | 547 | int find_main(int argc, char **argv) |
547 | { | 548 | { |
548 | int dereference = FALSE; | 549 | int dereference = FALSE; |
diff --git a/findutils/grep.c b/findutils/grep.c index 76f656237..f4652fa72 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
@@ -321,6 +321,7 @@ static int grep_dir(const char *dir) | |||
321 | } | 321 | } |
322 | 322 | ||
323 | 323 | ||
324 | int grep_main(int argc, char **argv); | ||
324 | int grep_main(int argc, char **argv) | 325 | int grep_main(int argc, char **argv) |
325 | { | 326 | { |
326 | FILE *file; | 327 | FILE *file; |
diff --git a/findutils/xargs.c b/findutils/xargs.c index 077b8847f..c2060f804 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c | |||
@@ -387,6 +387,7 @@ enum { | |||
387 | USE_FEATURE_XARGS_SUPPORT_TERMOPT( "x") \ | 387 | USE_FEATURE_XARGS_SUPPORT_TERMOPT( "x") \ |
388 | USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( "0") | 388 | USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( "0") |
389 | 389 | ||
390 | int xargs_main(int argc, char **argv); | ||
390 | int xargs_main(int argc, char **argv) | 391 | int xargs_main(int argc, char **argv) |
391 | { | 392 | { |
392 | char **args; | 393 | char **args; |
diff --git a/include/libbb.h b/include/libbb.h index 85afdf20a..d7332714f 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -495,11 +495,14 @@ extern void bb_vinfo_msg(const char *s, va_list p); | |||
495 | 495 | ||
496 | 496 | ||
497 | /* applets which are useful from another applets */ | 497 | /* applets which are useful from another applets */ |
498 | extern int bb_cat(char** argv); | 498 | int bb_cat(char** argv); |
499 | extern int bb_echo(char** argv); | 499 | int bb_echo(char** argv); |
500 | extern int bb_test(int argc, char** argv); | 500 | int bb_test(int argc, char** argv); |
501 | #if ENABLE_ROUTE | 501 | #if ENABLE_ROUTE |
502 | extern void bb_displayroutes(int noresolve, int netstatfmt); | 502 | void bb_displayroutes(int noresolve, int netstatfmt); |
503 | #endif | ||
504 | #if ENABLE_GUNZIP | ||
505 | int gunzip_main(int argc, char **argv); | ||
503 | #endif | 506 | #endif |
504 | 507 | ||
505 | 508 | ||
diff --git a/init/halt.c b/init/halt.c index a6cf48bbe..d5c22a8ac 100644 --- a/init/halt.c +++ b/init/halt.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include "busybox.h" | 10 | #include "busybox.h" |
11 | #include <sys/reboot.h> | 11 | #include <sys/reboot.h> |
12 | 12 | ||
13 | int halt_main(int argc, char *argv[]); | ||
13 | int halt_main(int argc, char *argv[]) | 14 | int halt_main(int argc, char *argv[]) |
14 | { | 15 | { |
15 | static const int magic[] = { | 16 | static const int magic[] = { |
diff --git a/init/init.c b/init/init.c index dc8752447..ce1f7391a 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -968,6 +968,7 @@ static void reload_signal(int sig ATTRIBUTE_UNUSED) | |||
968 | } | 968 | } |
969 | #endif /* FEATURE_USE_INITTAB */ | 969 | #endif /* FEATURE_USE_INITTAB */ |
970 | 970 | ||
971 | int init_main(int argc, char **argv); | ||
971 | int init_main(int argc, char **argv) | 972 | int init_main(int argc, char **argv) |
972 | { | 973 | { |
973 | struct init_action *a; | 974 | struct init_action *a; |
diff --git a/init/mesg.c b/init/mesg.c index 658c82447..40d8ae3ca 100644 --- a/init/mesg.c +++ b/init/mesg.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #define S_IWGRP_OR_S_IWOTH (S_IWGRP | S_IWOTH) | 15 | #define S_IWGRP_OR_S_IWOTH (S_IWGRP | S_IWOTH) |
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | int mesg_main(int argc, char *argv[]); | ||
18 | int mesg_main(int argc, char *argv[]) | 19 | int mesg_main(int argc, char *argv[]) |
19 | { | 20 | { |
20 | struct stat sb; | 21 | struct stat sb; |
diff --git a/libbb/get_console.c b/libbb/get_console.c index 52ae3d215..62a17399d 100644 --- a/libbb/get_console.c +++ b/libbb/get_console.c | |||
@@ -59,8 +59,8 @@ int get_console_fd(void) | |||
59 | char arg; | 59 | char arg; |
60 | 60 | ||
61 | fd4name = open_a_console(choise_console_names[fd]); | 61 | fd4name = open_a_console(choise_console_names[fd]); |
62 | chk_std: | 62 | chk_std: |
63 | choise_fd = fd4name >= 0 ? fd4name : fd; | 63 | choise_fd = (fd4name >= 0 ? fd4name : fd); |
64 | 64 | ||
65 | arg = 0; | 65 | arg = 0; |
66 | if (ioctl(choise_fd, KDGKBTYPE, &arg) == 0) | 66 | if (ioctl(choise_fd, KDGKBTYPE, &arg) == 0) |
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c index 0172e6041..768d2c061 100644 --- a/loginutils/addgroup.c +++ b/loginutils/addgroup.c | |||
@@ -84,6 +84,7 @@ static int addgroup(char *group, gid_t gid, const char *user) | |||
84 | * | 84 | * |
85 | * can be customized via command-line parameters. | 85 | * can be customized via command-line parameters. |
86 | * ________________________________________________________________________ */ | 86 | * ________________________________________________________________________ */ |
87 | int addgroup_main(int argc, char **argv); | ||
87 | int addgroup_main(int argc, char **argv) | 88 | int addgroup_main(int argc, char **argv) |
88 | { | 89 | { |
89 | char *group; | 90 | char *group; |
diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 5a48e9cbb..8193aea82 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c | |||
@@ -158,6 +158,7 @@ static int adduser(struct passwd *p, unsigned long flags) | |||
158 | * | 158 | * |
159 | * can be customized via command-line parameters. | 159 | * can be customized via command-line parameters. |
160 | */ | 160 | */ |
161 | int adduser_main(int argc, char **argv); | ||
161 | int adduser_main(int argc, char **argv) | 162 | int adduser_main(int argc, char **argv) |
162 | { | 163 | { |
163 | struct passwd pw; | 164 | struct passwd pw; |
diff --git a/loginutils/deluser.c b/loginutils/deluser.c index 034ab9431..e9bde00bd 100644 --- a/loginutils/deluser.c +++ b/loginutils/deluser.c | |||
@@ -61,6 +61,7 @@ static void del_line_matching(const char *login, const char *filename) | |||
61 | } | 61 | } |
62 | } | 62 | } |
63 | 63 | ||
64 | int deluser_main(int argc, char **argv); | ||
64 | int deluser_main(int argc, char **argv) | 65 | int deluser_main(int argc, char **argv) |
65 | { | 66 | { |
66 | if (argc != 2) | 67 | if (argc != 2) |
diff --git a/loginutils/getty.c b/loginutils/getty.c index 8f81cafcc..64d2d08c2 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c | |||
@@ -711,6 +711,7 @@ static void update_utmp(const char *line) | |||
711 | #endif /* SYSV_STYLE */ | 711 | #endif /* SYSV_STYLE */ |
712 | 712 | ||
713 | 713 | ||
714 | int getty_main(int argc, char **argv); | ||
714 | int getty_main(int argc, char **argv) | 715 | int getty_main(int argc, char **argv) |
715 | { | 716 | { |
716 | int nullfd; | 717 | int nullfd; |
diff --git a/loginutils/login.c b/loginutils/login.c index 94bb0ddcb..a19191b8c 100644 --- a/loginutils/login.c +++ b/loginutils/login.c | |||
@@ -211,6 +211,7 @@ static void alarm_handler(int sig ATTRIBUTE_UNUSED) | |||
211 | exit(EXIT_SUCCESS); | 211 | exit(EXIT_SUCCESS); |
212 | } | 212 | } |
213 | 213 | ||
214 | int login_main(int argc, char **argv); | ||
214 | int login_main(int argc, char **argv) | 215 | int login_main(int argc, char **argv) |
215 | { | 216 | { |
216 | enum { | 217 | enum { |
diff --git a/loginutils/passwd.c b/loginutils/passwd.c index ab20f2807..4531e63a6 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c | |||
@@ -229,6 +229,7 @@ static int update_passwd(const char *filename, const char *username, | |||
229 | } | 229 | } |
230 | 230 | ||
231 | 231 | ||
232 | int passwd_main(int argc, char **argv); | ||
232 | int passwd_main(int argc, char **argv) | 233 | int passwd_main(int argc, char **argv) |
233 | { | 234 | { |
234 | enum { | 235 | enum { |
diff --git a/loginutils/su.c b/loginutils/su.c index 9a134dd88..0a786cbfb 100644 --- a/loginutils/su.c +++ b/loginutils/su.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #define SU_OPT_mp (3) | 11 | #define SU_OPT_mp (3) |
12 | #define SU_OPT_l (4) | 12 | #define SU_OPT_l (4) |
13 | 13 | ||
14 | int su_main(int argc, char **argv); | ||
14 | int su_main(int argc, char **argv) | 15 | int su_main(int argc, char **argv) |
15 | { | 16 | { |
16 | unsigned flags; | 17 | unsigned flags; |
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index 8bcb393f5..8e3095c87 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c | |||
@@ -34,6 +34,7 @@ static void catchalarm(int ATTRIBUTE_UNUSED junk) | |||
34 | } | 34 | } |
35 | 35 | ||
36 | 36 | ||
37 | int sulogin_main(int argc, char **argv); | ||
37 | int sulogin_main(int argc, char **argv) | 38 | int sulogin_main(int argc, char **argv) |
38 | { | 39 | { |
39 | char *cp; | 40 | char *cp; |
diff --git a/loginutils/vlock.c b/loginutils/vlock.c index 7cc812fbb..06a7169d9 100644 --- a/loginutils/vlock.c +++ b/loginutils/vlock.c | |||
@@ -41,6 +41,7 @@ static void restore_terminal(void) | |||
41 | tcsetattr(STDIN_FILENO, TCSANOW, &oterm); | 41 | tcsetattr(STDIN_FILENO, TCSANOW, &oterm); |
42 | } | 42 | } |
43 | 43 | ||
44 | int vlock_main(int argc, char **argv); | ||
44 | int vlock_main(int argc, char **argv) | 45 | int vlock_main(int argc, char **argv) |
45 | { | 46 | { |
46 | sigset_t sig; | 47 | sigset_t sig; |
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index b35538a84..985ee2d0c 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c | |||
@@ -38,6 +38,7 @@ static const char * const ret_code_descript[] = { | |||
38 | "leap second has occurred", | 38 | "leap second has occurred", |
39 | "clock not synchronized" }; | 39 | "clock not synchronized" }; |
40 | 40 | ||
41 | int adjtimex_main(int argc, char **argv); | ||
41 | int adjtimex_main(int argc, char **argv) | 42 | int adjtimex_main(int argc, char **argv) |
42 | { | 43 | { |
43 | enum { | 44 | enum { |
diff --git a/miscutils/bbconfig.c b/miscutils/bbconfig.c index ce14d4a1f..6896506e6 100644 --- a/miscutils/bbconfig.c +++ b/miscutils/bbconfig.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include "busybox.h" | 4 | #include "busybox.h" |
5 | #include "bbconfigopts.h" | 5 | #include "bbconfigopts.h" |
6 | 6 | ||
7 | int bbconfig_main(int argc, char **argv); | ||
7 | int bbconfig_main(int argc, char **argv) | 8 | int bbconfig_main(int argc, char **argv) |
8 | { | 9 | { |
9 | printf(bbconfig_config); | 10 | printf(bbconfig_config); |
diff --git a/miscutils/crond.c b/miscutils/crond.c index aace3ee18..d237a677e 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c | |||
@@ -131,6 +131,7 @@ static void crondlog(const char *ctl, ...) | |||
131 | } | 131 | } |
132 | } | 132 | } |
133 | 133 | ||
134 | int crond_main(int ac, char **av); | ||
134 | int crond_main(int ac, char **av) | 135 | int crond_main(int ac, char **av) |
135 | { | 136 | { |
136 | unsigned opt; | 137 | unsigned opt; |
diff --git a/miscutils/crontab.c b/miscutils/crontab.c index eb7c2059c..02df85be8 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c | |||
@@ -31,6 +31,7 @@ static void EditFile(const char *user, const char *file); | |||
31 | static int GetReplaceStream(const char *user, const char *file); | 31 | static int GetReplaceStream(const char *user, const char *file); |
32 | static int ChangeUser(const char *user, short dochdir); | 32 | static int ChangeUser(const char *user, short dochdir); |
33 | 33 | ||
34 | int crontab_main(int ac, char **av); | ||
34 | int crontab_main(int ac, char **av) | 35 | int crontab_main(int ac, char **av) |
35 | { | 36 | { |
36 | enum { NONE, EDIT, LIST, REPLACE, DELETE } option = NONE; | 37 | enum { NONE, EDIT, LIST, REPLACE, DELETE } option = NONE; |
diff --git a/miscutils/dc.c b/miscutils/dc.c index 7b6405754..2121f7669 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c | |||
@@ -200,6 +200,7 @@ static int number_of_tokens(char *buffer) | |||
200 | return i; | 200 | return i; |
201 | } | 201 | } |
202 | 202 | ||
203 | int dc_main(int argc, char **argv); | ||
203 | int dc_main(int argc, char **argv) | 204 | int dc_main(int argc, char **argv) |
204 | { | 205 | { |
205 | /* take stuff from stdin if no args are given */ | 206 | /* take stuff from stdin if no args are given */ |
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index 7c604f604..69c698781 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -425,6 +425,7 @@ static unsigned int scan_dev_name(const char *d, unsigned int n, char *ptr) | |||
425 | 425 | ||
426 | /* Public functions follow */ | 426 | /* Public functions follow */ |
427 | 427 | ||
428 | int devfsd_main (int argc, char **argv); | ||
428 | int devfsd_main (int argc, char **argv) | 429 | int devfsd_main (int argc, char **argv) |
429 | { | 430 | { |
430 | int print_version = FALSE; | 431 | int print_version = FALSE; |
diff --git a/miscutils/eject.c b/miscutils/eject.c index 8e37c84b5..5d7ef1c28 100644 --- a/miscutils/eject.c +++ b/miscutils/eject.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #define FLAG_CLOSE 1 | 25 | #define FLAG_CLOSE 1 |
26 | #define FLAG_SMART 2 | 26 | #define FLAG_SMART 2 |
27 | 27 | ||
28 | int eject_main(int argc, char **argv); | ||
28 | int eject_main(int argc, char **argv) | 29 | int eject_main(int argc, char **argv) |
29 | { | 30 | { |
30 | unsigned long flags; | 31 | unsigned long flags; |
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index afb4ecc7b..eafb07898 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c | |||
@@ -2094,7 +2094,9 @@ static const char hdparm_options[] = "gfu::n::p:r::m::c::k::a::B:tTh" | |||
2094 | /*-------------------------------------*/ | 2094 | /*-------------------------------------*/ |
2095 | 2095 | ||
2096 | /* our main() routine: */ | 2096 | /* our main() routine: */ |
2097 | int hdparm_main(int argc, char **argv) ATTRIBUTE_NORETURN;; | ||
2097 | int hdparm_main(int argc, char **argv) ATTRIBUTE_NORETURN; | 2098 | int hdparm_main(int argc, char **argv) ATTRIBUTE_NORETURN; |
2099 | int hdparm_main(int argc, char **argv); | ||
2098 | int hdparm_main(int argc, char **argv) | 2100 | int hdparm_main(int argc, char **argv) |
2099 | { | 2101 | { |
2100 | int c; | 2102 | int c; |
diff --git a/miscutils/last.c b/miscutils/last.c index fd1033bf7..d354807e5 100644 --- a/miscutils/last.c +++ b/miscutils/last.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #error struct utmp member char[] size(s) have changed! | 26 | #error struct utmp member char[] size(s) have changed! |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | int last_main(int argc, char **argv); | ||
29 | int last_main(int argc, char **argv) | 30 | int last_main(int argc, char **argv) |
30 | { | 31 | { |
31 | struct utmp ut; | 32 | struct utmp ut; |
diff --git a/miscutils/less.c b/miscutils/less.c index 20da02208..9aae81fa4 100644 --- a/miscutils/less.c +++ b/miscutils/less.c | |||
@@ -1181,6 +1181,7 @@ static void sig_catcher(int sig ATTRIBUTE_UNUSED) | |||
1181 | exit(1); | 1181 | exit(1); |
1182 | } | 1182 | } |
1183 | 1183 | ||
1184 | int less_main(int argc, char **argv); | ||
1184 | int less_main(int argc, char **argv) | 1185 | int less_main(int argc, char **argv) |
1185 | { | 1186 | { |
1186 | int keypress; | 1187 | int keypress; |
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index 5602c2248..aa000a7ab 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include "busybox.h" | 10 | #include "busybox.h" |
11 | 11 | ||
12 | #ifdef CONFIG_FEATURE_MAKEDEVS_LEAF | 12 | #ifdef CONFIG_FEATURE_MAKEDEVS_LEAF |
13 | int makedevs_main(int argc, char **argv); | ||
13 | int makedevs_main(int argc, char **argv) | 14 | int makedevs_main(int argc, char **argv) |
14 | { | 15 | { |
15 | mode_t mode; | 16 | mode_t mode; |
@@ -68,6 +69,7 @@ int makedevs_main(int argc, char **argv) | |||
68 | 69 | ||
69 | /* Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */ | 70 | /* Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */ |
70 | 71 | ||
72 | int makedevs_main(int argc, char **argv); | ||
71 | int makedevs_main(int argc, char **argv) | 73 | int makedevs_main(int argc, char **argv) |
72 | { | 74 | { |
73 | FILE *table = stdin; | 75 | FILE *table = stdin; |
diff --git a/miscutils/mountpoint.c b/miscutils/mountpoint.c index b1bcab698..e380154ee 100644 --- a/miscutils/mountpoint.c +++ b/miscutils/mountpoint.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include "busybox.h" | 12 | #include "busybox.h" |
13 | 13 | ||
14 | int mountpoint_main(int argc, char **argv); | ||
14 | int mountpoint_main(int argc, char **argv) | 15 | int mountpoint_main(int argc, char **argv) |
15 | { | 16 | { |
16 | struct stat st; | 17 | struct stat st; |
diff --git a/miscutils/mt.c b/miscutils/mt.c index a4b527f1b..bed2969ca 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c | |||
@@ -50,6 +50,7 @@ static const struct mt_opcodes opcodes[] = { | |||
50 | {0, 0} | 50 | {0, 0} |
51 | }; | 51 | }; |
52 | 52 | ||
53 | int mt_main(int argc, char **argv); | ||
53 | int mt_main(int argc, char **argv) | 54 | int mt_main(int argc, char **argv) |
54 | { | 55 | { |
55 | const char *file = "/dev/tape"; | 56 | const char *file = "/dev/tape"; |
diff --git a/miscutils/nmeter.c b/miscutils/nmeter.c index 966131af5..efc78d767 100644 --- a/miscutils/nmeter.c +++ b/miscutils/nmeter.c | |||
@@ -729,6 +729,7 @@ static init_func* init_functions[] = { | |||
729 | init_cr, | 729 | init_cr, |
730 | }; | 730 | }; |
731 | 731 | ||
732 | int nmeter_main(int argc, char* argv[]); | ||
732 | int nmeter_main(int argc, char* argv[]) | 733 | int nmeter_main(int argc, char* argv[]) |
733 | { | 734 | { |
734 | char buf[32]; | 735 | char buf[32]; |
diff --git a/miscutils/raidautorun.c b/miscutils/raidautorun.c index e5bce9a92..c95b00aae 100644 --- a/miscutils/raidautorun.c +++ b/miscutils/raidautorun.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/major.h> | 13 | #include <linux/major.h> |
14 | #include <linux/raid/md_u.h> | 14 | #include <linux/raid/md_u.h> |
15 | 15 | ||
16 | int raidautorun_main(int argc, char **argv); | ||
16 | int raidautorun_main(int argc, char **argv) | 17 | int raidautorun_main(int argc, char **argv) |
17 | { | 18 | { |
18 | if (argc != 2) | 19 | if (argc != 2) |
diff --git a/miscutils/readahead.c b/miscutils/readahead.c index 356c40451..601e845bc 100644 --- a/miscutils/readahead.c +++ b/miscutils/readahead.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include "busybox.h" | 13 | #include "busybox.h" |
14 | 14 | ||
15 | int readahead_main(int argc, char **argv); | ||
15 | int readahead_main(int argc, char **argv) | 16 | int readahead_main(int argc, char **argv) |
16 | { | 17 | { |
17 | FILE *f; | 18 | FILE *f; |
diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c index 91d49fa55..23714f7c7 100644 --- a/miscutils/runlevel.c +++ b/miscutils/runlevel.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <time.h> | 18 | #include <time.h> |
19 | #include <stdlib.h> | 19 | #include <stdlib.h> |
20 | 20 | ||
21 | int runlevel_main(int argc, char *argv[]); | ||
21 | int runlevel_main(int argc, char *argv[]) | 22 | int runlevel_main(int argc, char *argv[]) |
22 | { | 23 | { |
23 | struct utmp *ut; | 24 | struct utmp *ut; |
diff --git a/miscutils/rx.c b/miscutils/rx.c index 6fb23b97b..29848b1d9 100644 --- a/miscutils/rx.c +++ b/miscutils/rx.c | |||
@@ -248,6 +248,7 @@ static void sigalrm_handler(int ATTRIBUTE_UNUSED signum) | |||
248 | { | 248 | { |
249 | } | 249 | } |
250 | 250 | ||
251 | int rx_main(int argc, char **argv); | ||
251 | int rx_main(int argc, char **argv) | 252 | int rx_main(int argc, char **argv) |
252 | { | 253 | { |
253 | char *fn; | 254 | char *fn; |
diff --git a/miscutils/setsid.c b/miscutils/setsid.c index 47c44d2cc..b4d5ced46 100644 --- a/miscutils/setsid.c +++ b/miscutils/setsid.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include "busybox.h" | 17 | #include "busybox.h" |
18 | 18 | ||
19 | int setsid_main(int argc, char *argv[]); | ||
19 | int setsid_main(int argc, char *argv[]) | 20 | int setsid_main(int argc, char *argv[]) |
20 | { | 21 | { |
21 | if (argc < 2) | 22 | if (argc < 2) |
diff --git a/miscutils/strings.c b/miscutils/strings.c index 691502dab..49f2cf31e 100644 --- a/miscutils/strings.c +++ b/miscutils/strings.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #define PRINT_OFFSET 4 | 18 | #define PRINT_OFFSET 4 |
19 | #define SIZE 8 | 19 | #define SIZE 8 |
20 | 20 | ||
21 | int strings_main(int argc, char **argv); | ||
21 | int strings_main(int argc, char **argv) | 22 | int strings_main(int argc, char **argv) |
22 | { | 23 | { |
23 | int n, c, i = 0, status = EXIT_SUCCESS; | 24 | int n, c, i = 0, status = EXIT_SUCCESS; |
diff --git a/miscutils/taskset.c b/miscutils/taskset.c index 28be31a31..cf6a8be99 100644 --- a/miscutils/taskset.c +++ b/miscutils/taskset.c | |||
@@ -41,6 +41,7 @@ static char *__from_cpuset(cpu_set_t *mask) | |||
41 | 41 | ||
42 | #define OPT_p 1 | 42 | #define OPT_p 1 |
43 | 43 | ||
44 | int taskset_main(int argc, char** argv); | ||
44 | int taskset_main(int argc, char** argv) | 45 | int taskset_main(int argc, char** argv) |
45 | { | 46 | { |
46 | cpu_set_t mask, new_mask; | 47 | cpu_set_t mask, new_mask; |
diff --git a/miscutils/time.c b/miscutils/time.c index df10eeb02..56f1d4ab8 100644 --- a/miscutils/time.c +++ b/miscutils/time.c | |||
@@ -427,6 +427,7 @@ static void run_command(char *const *cmd, resource_t * resp) | |||
427 | signal(SIGQUIT, quit_signal); | 427 | signal(SIGQUIT, quit_signal); |
428 | } | 428 | } |
429 | 429 | ||
430 | int time_main(int argc, char **argv); | ||
430 | int time_main(int argc, char **argv) | 431 | int time_main(int argc, char **argv) |
431 | { | 432 | { |
432 | resource_t res; | 433 | resource_t res; |
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index e342c13f3..9dbefb985 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c | |||
@@ -23,6 +23,7 @@ static void watchdog_shutdown(int ATTRIBUTE_UNUSED unused) | |||
23 | exit(0); | 23 | exit(0); |
24 | } | 24 | } |
25 | 25 | ||
26 | int watchdog_main(int argc, char **argv); | ||
26 | int watchdog_main(int argc, char **argv) | 27 | int watchdog_main(int argc, char **argv) |
27 | { | 28 | { |
28 | unsigned opts; | 29 | unsigned opts; |
diff --git a/modutils/insmod.c b/modutils/insmod.c index edbdfab0e..57092f79a 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c | |||
@@ -3945,6 +3945,7 @@ static void print_load_map(struct obj_file *f) | |||
3945 | void print_load_map(struct obj_file *f); | 3945 | void print_load_map(struct obj_file *f); |
3946 | #endif | 3946 | #endif |
3947 | 3947 | ||
3948 | int insmod_main( int argc, char **argv); | ||
3948 | int insmod_main( int argc, char **argv) | 3949 | int insmod_main( int argc, char **argv) |
3949 | { | 3950 | { |
3950 | char *opt_o, *arg1; | 3951 | char *opt_o, *arg1; |
@@ -4258,6 +4259,7 @@ static const char *moderror(int err) | |||
4258 | } | 4259 | } |
4259 | } | 4260 | } |
4260 | 4261 | ||
4262 | int insmod_ng_main(int argc, char **argv); | ||
4261 | int insmod_ng_main(int argc, char **argv) | 4263 | int insmod_ng_main(int argc, char **argv) |
4262 | { | 4264 | { |
4263 | long ret; | 4265 | long ret; |
diff --git a/modutils/lsmod.c b/modutils/lsmod.c index af16f2c61..31549b919 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c | |||
@@ -74,6 +74,7 @@ enum { | |||
74 | NEW_MOD_INITIALIZING = 64 | 74 | NEW_MOD_INITIALIZING = 64 |
75 | }; | 75 | }; |
76 | 76 | ||
77 | int lsmod_main(int argc, char **argv); | ||
77 | int lsmod_main(int argc, char **argv) | 78 | int lsmod_main(int argc, char **argv) |
78 | { | 79 | { |
79 | struct module_info info; | 80 | struct module_info info; |
@@ -139,6 +140,7 @@ int lsmod_main(int argc, char **argv) | |||
139 | 140 | ||
140 | #else /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */ | 141 | #else /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */ |
141 | 142 | ||
143 | int lsmod_main(int argc, char **argv); | ||
142 | int lsmod_main(int argc, char **argv) | 144 | int lsmod_main(int argc, char **argv) |
143 | { | 145 | { |
144 | FILE *file = xfopen("/proc/modules", "r"); | 146 | FILE *file = xfopen("/proc/modules", "r"); |
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 94f7b22c2..d5b5dd41b 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
@@ -861,6 +861,7 @@ static int mod_remove(char *mod) | |||
861 | return rc; | 861 | return rc; |
862 | } | 862 | } |
863 | 863 | ||
864 | int modprobe_main(int argc, char** argv); | ||
864 | int modprobe_main(int argc, char** argv) | 865 | int modprobe_main(int argc, char** argv) |
865 | { | 866 | { |
866 | int rc = EXIT_SUCCESS; | 867 | int rc = EXIT_SUCCESS; |
diff --git a/modutils/rmmod.c b/modutils/rmmod.c index 22e864d57..0a67b8965 100644 --- a/modutils/rmmod.c +++ b/modutils/rmmod.c | |||
@@ -38,6 +38,7 @@ void filename2modname(char *modname, const char *afterslash); | |||
38 | int query_module(const char *name, int which, void *buf, | 38 | int query_module(const char *name, int which, void *buf, |
39 | size_t bufsize, size_t *ret); | 39 | size_t bufsize, size_t *ret); |
40 | 40 | ||
41 | int rmmod_main(int argc, char **argv); | ||
41 | int rmmod_main(int argc, char **argv) | 42 | int rmmod_main(int argc, char **argv) |
42 | { | 43 | { |
43 | int n, ret = EXIT_SUCCESS; | 44 | int n, ret = EXIT_SUCCESS; |
diff --git a/networking/arp.c b/networking/arp.c index 33191d89b..2af6bc970 100644 --- a/networking/arp.c +++ b/networking/arp.c | |||
@@ -441,6 +441,7 @@ static int arp_show(char *name) | |||
441 | return 0; | 441 | return 0; |
442 | } | 442 | } |
443 | 443 | ||
444 | int arp_main(int argc, char **argv); | ||
444 | int arp_main(int argc, char **argv) | 445 | int arp_main(int argc, char **argv) |
445 | { | 446 | { |
446 | char *hw_type; | 447 | char *hw_type; |
diff --git a/networking/arping.c b/networking/arping.c index 7bab0d048..20c782f55 100644 --- a/networking/arping.c +++ b/networking/arping.c | |||
@@ -238,6 +238,7 @@ static int recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM) | |||
238 | return 1; | 238 | return 1; |
239 | } | 239 | } |
240 | 240 | ||
241 | int arping_main(int argc, char **argv); | ||
241 | int arping_main(int argc, char **argv) | 242 | int arping_main(int argc, char **argv) |
242 | { | 243 | { |
243 | const char *device = "eth0"; | 244 | const char *device = "eth0"; |
diff --git a/networking/dnsd.c b/networking/dnsd.c index 6a866f1d7..6d1335e67 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c | |||
@@ -330,6 +330,7 @@ static void interrupt(int x) | |||
330 | exit(2); | 330 | exit(2); |
331 | } | 331 | } |
332 | 332 | ||
333 | int dnsd_main(int argc, char **argv); | ||
333 | int dnsd_main(int argc, char **argv) | 334 | int dnsd_main(int argc, char **argv) |
334 | { | 335 | { |
335 | char *listen_interface = NULL; | 336 | char *listen_interface = NULL; |
diff --git a/networking/ether-wake.c b/networking/ether-wake.c index f923149b9..73f693e7f 100644 --- a/networking/ether-wake.c +++ b/networking/ether-wake.c | |||
@@ -105,6 +105,7 @@ static inline void get_dest_addr(const char *arg, struct ether_addr *eaddr); | |||
105 | static inline int get_fill(unsigned char *pkt, struct ether_addr *eaddr, int broadcast); | 105 | static inline int get_fill(unsigned char *pkt, struct ether_addr *eaddr, int broadcast); |
106 | static inline int get_wol_pw(const char *ethoptarg, unsigned char *wol_passwd); | 106 | static inline int get_wol_pw(const char *ethoptarg, unsigned char *wol_passwd); |
107 | 107 | ||
108 | int ether_wake_main(int argc, char *argv[]); | ||
108 | int ether_wake_main(int argc, char *argv[]) | 109 | int ether_wake_main(int argc, char *argv[]) |
109 | { | 110 | { |
110 | const char *ifname = "eth0"; | 111 | const char *ifname = "eth0"; |
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index 590b7ebcd..dad1c9947 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c | |||
@@ -297,6 +297,7 @@ static const struct option ftpgetput_long_options[] = { | |||
297 | }; | 297 | }; |
298 | #endif | 298 | #endif |
299 | 299 | ||
300 | int ftpgetput_main(int argc, char **argv); | ||
300 | int ftpgetput_main(int argc, char **argv) | 301 | int ftpgetput_main(int argc, char **argv) |
301 | { | 302 | { |
302 | /* content-length of the file */ | 303 | /* content-length of the file */ |
diff --git a/networking/hostname.c b/networking/hostname.c index 45aaaa465..3f6a658d6 100644 --- a/networking/hostname.c +++ b/networking/hostname.c | |||
@@ -41,6 +41,7 @@ static void do_sethostname(char *s, int isfile) | |||
41 | } | 41 | } |
42 | } | 42 | } |
43 | 43 | ||
44 | int hostname_main(int argc, char **argv); | ||
44 | int hostname_main(int argc, char **argv) | 45 | int hostname_main(int argc, char **argv) |
45 | { | 46 | { |
46 | enum { | 47 | enum { |
diff --git a/networking/httpd.c b/networking/httpd.c index e3f798c4c..fb363c56f 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -1902,6 +1902,7 @@ static const char httpd_opts[] = "c:d:h:" | |||
1902 | "p:if"; | 1902 | "p:if"; |
1903 | 1903 | ||
1904 | 1904 | ||
1905 | int httpd_main(int argc, char *argv[]); | ||
1905 | int httpd_main(int argc, char *argv[]) | 1906 | int httpd_main(int argc, char *argv[]) |
1906 | { | 1907 | { |
1907 | unsigned opt; | 1908 | unsigned opt; |
diff --git a/networking/ifconfig.c b/networking/ifconfig.c index 9cdd41c3a..b36f86d6a 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c | |||
@@ -261,6 +261,7 @@ static int in_ether(const char *bufp, struct sockaddr *sap); | |||
261 | * Our main function. | 261 | * Our main function. |
262 | */ | 262 | */ |
263 | 263 | ||
264 | int ifconfig_main(int argc, char **argv); | ||
264 | int ifconfig_main(int argc, char **argv) | 265 | int ifconfig_main(int argc, char **argv) |
265 | { | 266 | { |
266 | struct ifreq ifr; | 267 | struct ifreq ifr; |
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 834c7fa7d..ce3b9bab7 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -1083,6 +1083,7 @@ static llist_t *find_iface_state(llist_t *state_list, const char *iface) | |||
1083 | return NULL; | 1083 | return NULL; |
1084 | } | 1084 | } |
1085 | 1085 | ||
1086 | int ifupdown_main(int argc, char **argv); | ||
1086 | int ifupdown_main(int argc, char **argv) | 1087 | int ifupdown_main(int argc, char **argv) |
1087 | { | 1088 | { |
1088 | int (*cmds)(struct interface_defn_t *) = NULL; | 1089 | int (*cmds)(struct interface_defn_t *) = NULL; |
diff --git a/networking/inetd.c b/networking/inetd.c index 5e7005e9b..c037d114a 100644 --- a/networking/inetd.c +++ b/networking/inetd.c | |||
@@ -1246,8 +1246,8 @@ inetd_setproctitle(char *a, int s) | |||
1246 | #endif | 1246 | #endif |
1247 | 1247 | ||
1248 | 1248 | ||
1249 | int | 1249 | int inetd_main(int argc, char *argv[]); |
1250 | inetd_main(int argc, char *argv[]) | 1250 | int inetd_main(int argc, char *argv[]) |
1251 | { | 1251 | { |
1252 | servtab_t *sep; | 1252 | servtab_t *sep; |
1253 | struct passwd *pwd; | 1253 | struct passwd *pwd; |
diff --git a/networking/ip.c b/networking/ip.c index 7a7f55c46..fdd848049 100644 --- a/networking/ip.c +++ b/networking/ip.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include "libiproute/utils.h" | 17 | #include "libiproute/utils.h" |
18 | #include "libiproute/ip_common.h" | 18 | #include "libiproute/ip_common.h" |
19 | 19 | ||
20 | int ip_main(int argc, char **argv); | ||
20 | int ip_main(int argc, char **argv) | 21 | int ip_main(int argc, char **argv) |
21 | { | 22 | { |
22 | int ret = EXIT_FAILURE; | 23 | int ret = EXIT_FAILURE; |
diff --git a/networking/ipaddr.c b/networking/ipaddr.c index c90780879..fb0213702 100644 --- a/networking/ipaddr.c +++ b/networking/ipaddr.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include "busybox.h" | 18 | #include "busybox.h" |
19 | 19 | ||
20 | int ipaddr_main(int argc, char **argv); | ||
20 | int ipaddr_main(int argc, char **argv) | 21 | int ipaddr_main(int argc, char **argv) |
21 | { | 22 | { |
22 | ip_parse_common_args(&argc, &argv); | 23 | ip_parse_common_args(&argc, &argv); |
diff --git a/networking/ipcalc.c b/networking/ipcalc.c index 685f0e315..63ce99ffe 100644 --- a/networking/ipcalc.c +++ b/networking/ipcalc.c | |||
@@ -76,6 +76,7 @@ int get_prefix(unsigned long netmask); | |||
76 | }; | 76 | }; |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | int ipcalc_main(int argc, char **argv); | ||
79 | int ipcalc_main(int argc, char **argv) | 80 | int ipcalc_main(int argc, char **argv) |
80 | { | 81 | { |
81 | unsigned opt; | 82 | unsigned opt; |
diff --git a/networking/iplink.c b/networking/iplink.c index 4a28c74a9..54087e927 100644 --- a/networking/iplink.c +++ b/networking/iplink.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include "busybox.h" | 18 | #include "busybox.h" |
19 | 19 | ||
20 | int iplink_main(int argc, char **argv); | ||
20 | int iplink_main(int argc, char **argv) | 21 | int iplink_main(int argc, char **argv) |
21 | { | 22 | { |
22 | ip_parse_common_args(&argc, &argv); | 23 | ip_parse_common_args(&argc, &argv); |
diff --git a/networking/iproute.c b/networking/iproute.c index 62335a8b3..3d540b2ba 100644 --- a/networking/iproute.c +++ b/networking/iproute.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include "busybox.h" | 18 | #include "busybox.h" |
19 | 19 | ||
20 | int iproute_main(int argc, char **argv); | ||
20 | int iproute_main(int argc, char **argv) | 21 | int iproute_main(int argc, char **argv) |
21 | { | 22 | { |
22 | ip_parse_common_args(&argc, &argv); | 23 | ip_parse_common_args(&argc, &argv); |
diff --git a/networking/iprule.c b/networking/iprule.c index 43eaea633..9c1fb50de 100644 --- a/networking/iprule.c +++ b/networking/iprule.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include "busybox.h" | 18 | #include "busybox.h" |
19 | 19 | ||
20 | int iprule_main(int argc, char **argv); | ||
20 | int iprule_main(int argc, char **argv) | 21 | int iprule_main(int argc, char **argv) |
21 | { | 22 | { |
22 | ip_parse_common_args(&argc, &argv); | 23 | ip_parse_common_args(&argc, &argv); |
diff --git a/networking/iptunnel.c b/networking/iptunnel.c index 9ae734a21..8a65413b6 100644 --- a/networking/iptunnel.c +++ b/networking/iptunnel.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include "busybox.h" | 18 | #include "busybox.h" |
19 | 19 | ||
20 | int iptunnel_main(int argc, char **argv); | ||
20 | int iptunnel_main(int argc, char **argv) | 21 | int iptunnel_main(int argc, char **argv) |
21 | { | 22 | { |
22 | ip_parse_common_args(&argc, &argv); | 23 | ip_parse_common_args(&argc, &argv); |
diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c index 2d4399cea..f9ab0b2c0 100644 --- a/networking/isrv_identd.c +++ b/networking/isrv_identd.c | |||
@@ -92,6 +92,7 @@ static void inetd_mode(void) | |||
92 | while (do_rd(0, (void*)&buf) == 0); | 92 | while (do_rd(0, (void*)&buf) == 0); |
93 | } | 93 | } |
94 | 94 | ||
95 | int fakeidentd_main(int argc, char **argv); | ||
95 | int fakeidentd_main(int argc, char **argv) | 96 | int fakeidentd_main(int argc, char **argv) |
96 | { | 97 | { |
97 | enum { | 98 | enum { |
diff --git a/networking/nameif.c b/networking/nameif.c index 52aad2873..ec77512c3 100644 --- a/networking/nameif.c +++ b/networking/nameif.c | |||
@@ -55,6 +55,7 @@ static struct ether_addr *cc_macaddr(const char *str_macaddr) | |||
55 | return mac; | 55 | return mac; |
56 | } | 56 | } |
57 | 57 | ||
58 | int nameif_main(int argc, char **argv); | ||
58 | int nameif_main(int argc, char **argv) | 59 | int nameif_main(int argc, char **argv) |
59 | { | 60 | { |
60 | mactable_t *clist = NULL; | 61 | mactable_t *clist = NULL; |
diff --git a/networking/nc.c b/networking/nc.c index dc9102b2a..c1e881162 100644 --- a/networking/nc.c +++ b/networking/nc.c | |||
@@ -18,6 +18,7 @@ static void timeout(int signum) | |||
18 | bb_error_msg_and_die("timed out"); | 18 | bb_error_msg_and_die("timed out"); |
19 | } | 19 | } |
20 | 20 | ||
21 | int nc_main(int argc, char **argv); | ||
21 | int nc_main(int argc, char **argv) | 22 | int nc_main(int argc, char **argv) |
22 | { | 23 | { |
23 | /* sfd sits _here_ only because of "repeat" option (-l -l). */ | 24 | /* sfd sits _here_ only because of "repeat" option (-l -l). */ |
diff --git a/networking/netstat.c b/networking/netstat.c index a5631c3c0..d89d3aa5a 100644 --- a/networking/netstat.c +++ b/networking/netstat.c | |||
@@ -510,6 +510,7 @@ static void do_info(const char *file, const char *name, void (*proc)(int, const | |||
510 | * Our main function. | 510 | * Our main function. |
511 | */ | 511 | */ |
512 | 512 | ||
513 | int netstat_main(int argc, char **argv); | ||
513 | int netstat_main(int argc, char **argv) | 514 | int netstat_main(int argc, char **argv) |
514 | { | 515 | { |
515 | enum { | 516 | enum { |
diff --git a/networking/nslookup.c b/networking/nslookup.c index 914f3f5ee..14c05b3e6 100644 --- a/networking/nslookup.c +++ b/networking/nslookup.c | |||
@@ -128,6 +128,7 @@ static void set_default_dns(char *server) | |||
128 | } | 128 | } |
129 | } | 129 | } |
130 | 130 | ||
131 | int nslookup_main(int argc, char **argv); | ||
131 | int nslookup_main(int argc, char **argv) | 132 | int nslookup_main(int argc, char **argv) |
132 | { | 133 | { |
133 | /* We allow 1 or 2 arguments. | 134 | /* We allow 1 or 2 arguments. |
diff --git a/networking/ping.c b/networking/ping.c index ba4f585db..d0e6f3ad1 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
@@ -185,6 +185,7 @@ static void ping6(len_and_sockaddr *lsa) | |||
185 | } | 185 | } |
186 | #endif | 186 | #endif |
187 | 187 | ||
188 | int ping_main(int argc, char **argv); | ||
188 | int ping_main(int argc, char **argv) | 189 | int ping_main(int argc, char **argv) |
189 | { | 190 | { |
190 | len_and_sockaddr *lsa; | 191 | len_and_sockaddr *lsa; |
@@ -715,6 +716,7 @@ static int parse_nipquad(const char *str, struct sockaddr_in* addr) | |||
715 | return 1; /* error */ | 716 | return 1; /* error */ |
716 | } | 717 | } |
717 | 718 | ||
719 | int ping_main(int argc, char **argv); | ||
718 | int ping_main(int argc, char **argv) | 720 | int ping_main(int argc, char **argv) |
719 | { | 721 | { |
720 | len_and_sockaddr *lsa; | 722 | len_and_sockaddr *lsa; |
@@ -759,6 +761,7 @@ int ping_main(int argc, char **argv) | |||
759 | 761 | ||
760 | 762 | ||
761 | #if ENABLE_PING6 | 763 | #if ENABLE_PING6 |
764 | int ping6_main(int argc, char **argv); | ||
762 | int ping6_main(int argc, char **argv) | 765 | int ping6_main(int argc, char **argv) |
763 | { | 766 | { |
764 | argv[0] = (char*)"-6"; | 767 | argv[0] = (char*)"-6"; |
diff --git a/networking/route.c b/networking/route.c index d32011cc4..069739006 100644 --- a/networking/route.c +++ b/networking/route.c | |||
@@ -638,6 +638,7 @@ static const char tbl_verb[] = /* 2nd byte matches RTACTION_* code */ | |||
638 | "\010\002delete" /* Since last, we can save a byte. */ | 638 | "\010\002delete" /* Since last, we can save a byte. */ |
639 | ; | 639 | ; |
640 | 640 | ||
641 | int route_main(int argc, char **argv); | ||
641 | int route_main(int argc, char **argv) | 642 | int route_main(int argc, char **argv) |
642 | { | 643 | { |
643 | unsigned opt; | 644 | unsigned opt; |
diff --git a/networking/telnet.c b/networking/telnet.c index 7407fa413..2a6457f2c 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
@@ -581,6 +581,7 @@ static void cookmode(void) | |||
581 | if (G.do_termios) tcsetattr(0, TCSADRAIN, &G.termios_def); | 581 | if (G.do_termios) tcsetattr(0, TCSADRAIN, &G.termios_def); |
582 | } | 582 | } |
583 | 583 | ||
584 | int telnet_main(int argc, char** argv); | ||
584 | int telnet_main(int argc, char** argv) | 585 | int telnet_main(int argc, char** argv) |
585 | { | 586 | { |
586 | char *host; | 587 | char *host; |
diff --git a/networking/telnetd.c b/networking/telnetd.c index 25cba3eb0..ef9b1ac74 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c | |||
@@ -360,8 +360,8 @@ void free_session(struct tsession *ts); | |||
360 | #endif | 360 | #endif |
361 | 361 | ||
362 | 362 | ||
363 | int | 363 | int telnetd_main(int argc, char **argv); |
364 | telnetd_main(int argc, char **argv) | 364 | int telnetd_main(int argc, char **argv) |
365 | { | 365 | { |
366 | fd_set rdfdset, wrfdset; | 366 | fd_set rdfdset, wrfdset; |
367 | unsigned opt; | 367 | unsigned opt; |
diff --git a/networking/tftp.c b/networking/tftp.c index eb192d8fc..a6d85a5c4 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -435,6 +435,7 @@ static int tftp( | |||
435 | return finished ? EXIT_SUCCESS : EXIT_FAILURE; | 435 | return finished ? EXIT_SUCCESS : EXIT_FAILURE; |
436 | } | 436 | } |
437 | 437 | ||
438 | int tftp_main(int argc, char **argv); | ||
438 | int tftp_main(int argc, char **argv) | 439 | int tftp_main(int argc, char **argv) |
439 | { | 440 | { |
440 | len_and_sockaddr *peer_lsa; | 441 | len_and_sockaddr *peer_lsa; |
diff --git a/networking/traceroute.c b/networking/traceroute.c index 25c6569bb..4ddde2fda 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c | |||
@@ -886,8 +886,8 @@ getaddr(uint32_t *ap, const char *host) | |||
886 | #endif | 886 | #endif |
887 | 887 | ||
888 | 888 | ||
889 | int | 889 | int traceroute_main(int argc, char *argv[]); |
890 | traceroute_main(int argc, char *argv[]) | 890 | int traceroute_main(int argc, char *argv[]) |
891 | { | 891 | { |
892 | int code, n; | 892 | int code, n; |
893 | unsigned char *outp; | 893 | unsigned char *outp; |
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index e48e1f25e..a59c5db74 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -122,6 +122,7 @@ static uint8_t* alloc_dhcp_option(int code, const char *str, int extra) | |||
122 | } | 122 | } |
123 | 123 | ||
124 | 124 | ||
125 | int udhcpc_main(int argc, char *argv[]); | ||
125 | int udhcpc_main(int argc, char *argv[]) | 126 | int udhcpc_main(int argc, char *argv[]) |
126 | { | 127 | { |
127 | uint8_t *temp, *message; | 128 | uint8_t *temp, *message; |
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index 7d0b8fad1..90d8f0d17 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c | |||
@@ -20,6 +20,7 @@ struct dhcpOfferedAddr *leases; | |||
20 | struct server_config_t server_config; | 20 | struct server_config_t server_config; |
21 | 21 | ||
22 | 22 | ||
23 | int udhcpd_main(int argc, char *argv[]); | ||
23 | int udhcpd_main(int argc, char *argv[]) | 24 | int udhcpd_main(int argc, char *argv[]) |
24 | { | 25 | { |
25 | fd_set rfds; | 26 | fd_set rfds; |
diff --git a/networking/udhcp/dhcprelay.c b/networking/udhcp/dhcprelay.c index 418aa7cbb..9bb7aeab5 100644 --- a/networking/udhcp/dhcprelay.c +++ b/networking/udhcp/dhcprelay.c | |||
@@ -295,6 +295,7 @@ static void dhcprelay_loop(int *fds, int num_sockets, int max_socket, char **cli | |||
295 | } | 295 | } |
296 | } | 296 | } |
297 | 297 | ||
298 | int dhcprelay_main(int argc, char **argv); | ||
298 | int dhcprelay_main(int argc, char **argv) | 299 | int dhcprelay_main(int argc, char **argv) |
299 | { | 300 | { |
300 | int i, num_sockets, max_socket, fds[MAX_INTERFACES]; | 301 | int i, num_sockets, max_socket, fds[MAX_INTERFACES]; |
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index a0e81bb13..ce73c474c 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #define REMAINING 0 | 11 | #define REMAINING 0 |
12 | #define ABSOLUTE 1 | 12 | #define ABSOLUTE 1 |
13 | 13 | ||
14 | int dumpleases_main(int argc, char *argv[]); | ||
14 | int dumpleases_main(int argc, char *argv[]) | 15 | int dumpleases_main(int argc, char *argv[]) |
15 | { | 16 | { |
16 | int fp; | 17 | int fp; |
diff --git a/networking/vconfig.c b/networking/vconfig.c index 003c1a8f7..06c06cb5e 100644 --- a/networking/vconfig.c +++ b/networking/vconfig.c | |||
@@ -106,6 +106,7 @@ static const char name_types[] = { | |||
106 | 106 | ||
107 | static const char conf_file_name[] = "/proc/net/vlan/config"; | 107 | static const char conf_file_name[] = "/proc/net/vlan/config"; |
108 | 108 | ||
109 | int vconfig_main(int argc, char **argv); | ||
109 | int vconfig_main(int argc, char **argv) | 110 | int vconfig_main(int argc, char **argv) |
110 | { | 111 | { |
111 | struct vlan_ioctl_args ifr; | 112 | struct vlan_ioctl_args ifr; |
diff --git a/networking/wget.c b/networking/wget.c index 432756ce5..e1a4bab0d 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -86,6 +86,7 @@ static char *base64enc(unsigned char *p, char *buf, int len) | |||
86 | } | 86 | } |
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | int wget_main(int argc, char **argv); | ||
89 | int wget_main(int argc, char **argv) | 90 | int wget_main(int argc, char **argv) |
90 | { | 91 | { |
91 | char buf[512]; | 92 | char buf[512]; |
diff --git a/networking/zcip.c b/networking/zcip.c index b56870652..e3755a932 100644 --- a/networking/zcip.c +++ b/networking/zcip.c | |||
@@ -204,6 +204,7 @@ static int ready; // = 0; | |||
204 | static int verbose; // = 0; | 204 | static int verbose; // = 0; |
205 | static int state = PROBE; | 205 | static int state = PROBE; |
206 | 206 | ||
207 | int zcip_main(int argc, char *argv[]); | ||
207 | int zcip_main(int argc, char *argv[]) | 208 | int zcip_main(int argc, char *argv[]) |
208 | { | 209 | { |
209 | struct ether_addr eth_addr; | 210 | struct ether_addr eth_addr; |
diff --git a/procps/free.c b/procps/free.c index 84432e0d1..860f57347 100644 --- a/procps/free.c +++ b/procps/free.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include "busybox.h" | 12 | #include "busybox.h" |
13 | 13 | ||
14 | int free_main(int argc, char **argv); | ||
14 | int free_main(int argc, char **argv) | 15 | int free_main(int argc, char **argv) |
15 | { | 16 | { |
16 | struct sysinfo info; | 17 | struct sysinfo info; |
diff --git a/procps/fuser.c b/procps/fuser.c index 9752af74e..c91ae217b 100644 --- a/procps/fuser.c +++ b/procps/fuser.c | |||
@@ -301,6 +301,7 @@ static int fuser_kill_pid_list(pid_list *plist, int sig) | |||
301 | return success; | 301 | return success; |
302 | } | 302 | } |
303 | 303 | ||
304 | int fuser_main(int argc, char **argv); | ||
304 | int fuser_main(int argc, char **argv) | 305 | int fuser_main(int argc, char **argv) |
305 | { | 306 | { |
306 | int port, i, optn; | 307 | int port, i, optn; |
diff --git a/procps/kill.c b/procps/kill.c index 5b167326f..9a6e93665 100644 --- a/procps/kill.c +++ b/procps/kill.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include "busybox.h" | 11 | #include "busybox.h" |
12 | 12 | ||
13 | int kill_main(int argc, char **argv); | ||
13 | int kill_main(int argc, char **argv) | 14 | int kill_main(int argc, char **argv) |
14 | { | 15 | { |
15 | char *arg; | 16 | char *arg; |
diff --git a/procps/pidof.c b/procps/pidof.c index 1d9718945..ea2520a4f 100644 --- a/procps/pidof.c +++ b/procps/pidof.c | |||
@@ -16,6 +16,7 @@ enum { | |||
16 | OPT_OMIT = USE_FEATURE_PIDOF_OMIT( (1<<OPTBIT_OMIT )) + 0, | 16 | OPT_OMIT = USE_FEATURE_PIDOF_OMIT( (1<<OPTBIT_OMIT )) + 0, |
17 | }; | 17 | }; |
18 | 18 | ||
19 | int pidof_main(int argc, char **argv); | ||
19 | int pidof_main(int argc, char **argv) | 20 | int pidof_main(int argc, char **argv) |
20 | { | 21 | { |
21 | unsigned first = 1; | 22 | unsigned first = 1; |
diff --git a/procps/ps.c b/procps/ps.c index acd9a3065..f3d11b72c 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -233,6 +233,7 @@ static void format_process(const procps_status_t *ps) | |||
233 | /* Cannot be const: parse_o() will choke */ | 233 | /* Cannot be const: parse_o() will choke */ |
234 | static char default_o[] = "pid,user" /* TODO: ,vsz,stat */ ",args"; | 234 | static char default_o[] = "pid,user" /* TODO: ,vsz,stat */ ",args"; |
235 | 235 | ||
236 | int ps_main(int argc, char **argv); | ||
236 | int ps_main(int argc, char **argv) | 237 | int ps_main(int argc, char **argv) |
237 | { | 238 | { |
238 | procps_status_t *p; | 239 | procps_status_t *p; |
@@ -280,6 +281,7 @@ int ps_main(int argc, char **argv) | |||
280 | #else /* !ENABLE_DESKTOP */ | 281 | #else /* !ENABLE_DESKTOP */ |
281 | 282 | ||
282 | 283 | ||
284 | int ps_main(int argc, char **argv); | ||
283 | int ps_main(int argc, char **argv) | 285 | int ps_main(int argc, char **argv) |
284 | { | 286 | { |
285 | procps_status_t *p = NULL; | 287 | procps_status_t *p = NULL; |
diff --git a/procps/renice.c b/procps/renice.c index 08e0dc264..2964e20ea 100644 --- a/procps/renice.c +++ b/procps/renice.c | |||
@@ -26,6 +26,7 @@ void BUG_bad_PRIO_PROCESS(void); | |||
26 | void BUG_bad_PRIO_PGRP(void); | 26 | void BUG_bad_PRIO_PGRP(void); |
27 | void BUG_bad_PRIO_USER(void); | 27 | void BUG_bad_PRIO_USER(void); |
28 | 28 | ||
29 | int renice_main(int argc, char **argv); | ||
29 | int renice_main(int argc, char **argv) | 30 | int renice_main(int argc, char **argv) |
30 | { | 31 | { |
31 | static const char Xetpriority_msg[] = "%cetpriority"; | 32 | static const char Xetpriority_msg[] = "%cetpriority"; |
diff --git a/procps/sysctl.c b/procps/sysctl.c index 49754489b..b5a01894f 100644 --- a/procps/sysctl.c +++ b/procps/sysctl.c | |||
@@ -56,6 +56,7 @@ static void dwrite_str(int fd, const char *buf) | |||
56 | /* | 56 | /* |
57 | * sysctl_main()... | 57 | * sysctl_main()... |
58 | */ | 58 | */ |
59 | int sysctl_main(int argc, char **argv); | ||
59 | int sysctl_main(int argc, char **argv) | 60 | int sysctl_main(int argc, char **argv) |
60 | { | 61 | { |
61 | int retval = 0; | 62 | int retval = 0; |
diff --git a/procps/top.c b/procps/top.c index 712544318..2681f9748 100644 --- a/procps/top.c +++ b/procps/top.c | |||
@@ -411,6 +411,7 @@ static void sig_catcher(int sig ATTRIBUTE_UNUSED) | |||
411 | #endif /* FEATURE_USE_TERMIOS */ | 411 | #endif /* FEATURE_USE_TERMIOS */ |
412 | 412 | ||
413 | 413 | ||
414 | int top_main(int argc, char **argv); | ||
414 | int top_main(int argc, char **argv) | 415 | int top_main(int argc, char **argv) |
415 | { | 416 | { |
416 | int count, lines, col; | 417 | int count, lines, col; |
diff --git a/procps/uptime.c b/procps/uptime.c index 37c9d449a..3573ffe73 100644 --- a/procps/uptime.c +++ b/procps/uptime.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100) | 25 | #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100) |
26 | 26 | ||
27 | 27 | ||
28 | int uptime_main(int argc, char **argv); | ||
28 | int uptime_main(int argc, char **argv) | 29 | int uptime_main(int argc, char **argv) |
29 | { | 30 | { |
30 | int updays, uphours, upminutes; | 31 | int updays, uphours, upminutes; |
diff --git a/runit/chpst.c b/runit/chpst.c index 4662a4a83..053051d1d 100644 --- a/runit/chpst.c +++ b/runit/chpst.c | |||
@@ -255,6 +255,7 @@ static void envuidgid(int, char **); | |||
255 | static void envdir(int, char **); | 255 | static void envdir(int, char **); |
256 | static void softlimit(int, char **); | 256 | static void softlimit(int, char **); |
257 | 257 | ||
258 | int chpst_main(int argc, char **argv); | ||
258 | int chpst_main(int argc, char **argv) | 259 | int chpst_main(int argc, char **argv) |
259 | { | 260 | { |
260 | if (applet_name[3] == 'd') envdir(argc, argv); | 261 | if (applet_name[3] == 'd') envdir(argc, argv); |
diff --git a/runit/runsv.c b/runit/runsv.c index 03187a8b7..246c50285 100644 --- a/runit/runsv.c +++ b/runit/runsv.c | |||
@@ -390,6 +390,7 @@ static int ctrl(struct svdir *s, char c) | |||
390 | return 1; | 390 | return 1; |
391 | } | 391 | } |
392 | 392 | ||
393 | int runsv_main(int argc, char **argv); | ||
393 | int runsv_main(int argc, char **argv) | 394 | int runsv_main(int argc, char **argv) |
394 | { | 395 | { |
395 | struct stat s; | 396 | struct stat s; |
diff --git a/runit/runsvdir.c b/runit/runsvdir.c index 7e1dd6c30..d9053ad6a 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c | |||
@@ -174,6 +174,7 @@ static int setup_log(void) | |||
174 | return 1; | 174 | return 1; |
175 | } | 175 | } |
176 | 176 | ||
177 | int runsvdir_main(int argc, char **argv); | ||
177 | int runsvdir_main(int argc, char **argv) | 178 | int runsvdir_main(int argc, char **argv) |
178 | { | 179 | { |
179 | struct stat s; | 180 | struct stat s; |
diff --git a/runit/sv.c b/runit/sv.c index 2af9f6604..7635330e4 100644 --- a/runit/sv.c +++ b/runit/sv.c | |||
@@ -251,6 +251,7 @@ static int control(const char *a) | |||
251 | return 1; | 251 | return 1; |
252 | } | 252 | } |
253 | 253 | ||
254 | int sv_main(int argc, char **argv); | ||
254 | int sv_main(int argc, char **argv) | 255 | int sv_main(int argc, char **argv) |
255 | { | 256 | { |
256 | unsigned opt; | 257 | unsigned opt; |
diff --git a/runit/svlogd.c b/runit/svlogd.c index 0f17eec7b..e454bace8 100644 --- a/runit/svlogd.c +++ b/runit/svlogd.c | |||
@@ -746,6 +746,7 @@ static void logmatch(struct logdir *ld) | |||
746 | } | 746 | } |
747 | } | 747 | } |
748 | 748 | ||
749 | int svlogd_main(int argc, char **argv); | ||
749 | int svlogd_main(int argc, char **argv) | 750 | int svlogd_main(int argc, char **argv) |
750 | { | 751 | { |
751 | sigset_t ss; | 752 | sigset_t ss; |
diff --git a/shell/ash.c b/shell/ash.c index 0f9b3288b..bfaf04ffd 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -7900,8 +7900,8 @@ static void read_profile(const char *); | |||
7900 | * is used to figure out how far we had gotten. | 7900 | * is used to figure out how far we had gotten. |
7901 | */ | 7901 | */ |
7902 | 7902 | ||
7903 | int | 7903 | int ash_main(int argc, char **argv); |
7904 | ash_main(int argc, char **argv) | 7904 | int ash_main(int argc, char **argv) |
7905 | { | 7905 | { |
7906 | char *shinit; | 7906 | char *shinit; |
7907 | volatile int state; | 7907 | volatile int state; |
diff --git a/shell/bbsh.c b/shell/bbsh.c index 7978fdc16..fe27f4418 100644 --- a/shell/bbsh.c +++ b/shell/bbsh.c | |||
@@ -198,6 +198,7 @@ static void handle(char *command) | |||
198 | } | 198 | } |
199 | } | 199 | } |
200 | 200 | ||
201 | int bbsh_main(int argc, char *argv[]); | ||
201 | int bbsh_main(int argc, char *argv[]) | 202 | int bbsh_main(int argc, char *argv[]) |
202 | { | 203 | { |
203 | char *command=NULL; | 204 | char *command=NULL; |
diff --git a/shell/hush.c b/shell/hush.c index c3640ed3a..573724075 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -2686,6 +2686,7 @@ static void setup_job_control(void) | |||
2686 | tcsetpgrp(shell_terminal, shell_pgrp); | 2686 | tcsetpgrp(shell_terminal, shell_pgrp); |
2687 | } | 2687 | } |
2688 | 2688 | ||
2689 | int hush_main(int argc, char **argv); | ||
2689 | int hush_main(int argc, char **argv) | 2690 | int hush_main(int argc, char **argv) |
2690 | { | 2691 | { |
2691 | int opt; | 2692 | int opt; |
diff --git a/shell/lash.c b/shell/lash.c index 51ad3cc06..502e0d829 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
@@ -1502,6 +1502,7 @@ static inline void setup_job_control(void) | |||
1502 | } | 1502 | } |
1503 | #endif | 1503 | #endif |
1504 | 1504 | ||
1505 | int lash_main(int argc_l, char **argv_l); | ||
1505 | int lash_main(int argc_l, char **argv_l) | 1506 | int lash_main(int argc_l, char **argv_l) |
1506 | { | 1507 | { |
1507 | unsigned opt; | 1508 | unsigned opt; |
diff --git a/shell/msh.c b/shell/msh.c index 496435189..817b84093 100644 --- a/shell/msh.c +++ b/shell/msh.c | |||
@@ -5097,6 +5097,7 @@ static void freehere(int area) | |||
5097 | * shell | 5097 | * shell |
5098 | */ | 5098 | */ |
5099 | 5099 | ||
5100 | int msh_main(int argc, char **argv); | ||
5100 | int msh_main(int argc, char **argv) | 5101 | int msh_main(int argc, char **argv) |
5101 | { | 5102 | { |
5102 | int f; | 5103 | int f; |
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index d916878bf..47c2c7252 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c | |||
@@ -34,6 +34,7 @@ static void klogd_signal(int sig ATTRIBUTE_UNUSED) | |||
34 | 34 | ||
35 | #define KLOGD_LOGBUF_SIZE 4096 | 35 | #define KLOGD_LOGBUF_SIZE 4096 |
36 | 36 | ||
37 | int klogd_main(int argc, char **argv); | ||
37 | int klogd_main(int argc, char **argv) | 38 | int klogd_main(int argc, char **argv) |
38 | { | 39 | { |
39 | RESERVE_CONFIG_BUFFER(log_buffer, KLOGD_LOGBUF_SIZE); | 40 | RESERVE_CONFIG_BUFFER(log_buffer, KLOGD_LOGBUF_SIZE); |
diff --git a/sysklogd/logger.c b/sysklogd/logger.c index 8aaf522d0..71dd53142 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c | |||
@@ -81,6 +81,7 @@ static int pencode(char *s) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | 83 | ||
84 | int logger_main(int argc, char **argv); | ||
84 | int logger_main(int argc, char **argv) | 85 | int logger_main(int argc, char **argv) |
85 | { | 86 | { |
86 | char *str_p, *str_t; | 87 | char *str_p, *str_t; |
diff --git a/sysklogd/logread.c b/sysklogd/logread.c index d092056bf..b1758a695 100644 --- a/sysklogd/logread.c +++ b/sysklogd/logread.c | |||
@@ -54,6 +54,7 @@ static void interrupted(int sig ATTRIBUTE_UNUSED) | |||
54 | exit(0); | 54 | exit(0); |
55 | } | 55 | } |
56 | 56 | ||
57 | int logread_main(int argc, char **argv); | ||
57 | int logread_main(int argc, char **argv) | 58 | int logread_main(int argc, char **argv) |
58 | { | 59 | { |
59 | int cur; | 60 | int cur; |
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index bfa9a446c..86bfdc5df 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -542,6 +542,7 @@ static void do_syslogd(void) | |||
542 | } /* for */ | 542 | } /* for */ |
543 | } | 543 | } |
544 | 544 | ||
545 | int syslogd_main(int argc, char **argv); | ||
545 | int syslogd_main(int argc, char **argv) | 546 | int syslogd_main(int argc, char **argv) |
546 | { | 547 | { |
547 | char OPTION_DECL; | 548 | char OPTION_DECL; |
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index 658cddc38..0bbc306fc 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <unistd.h> | 13 | #include <unistd.h> |
14 | #include <sys/klog.h> | 14 | #include <sys/klog.h> |
15 | 15 | ||
16 | int dmesg_main(int argc, char *argv[]); | ||
16 | int dmesg_main(int argc, char *argv[]) | 17 | int dmesg_main(int argc, char *argv[]) |
17 | { | 18 | { |
18 | char *size, *level; | 19 | char *size, *level; |
diff --git a/util-linux/fbset.c b/util-linux/fbset.c index 94d04b12a..bd584e460 100644 --- a/util-linux/fbset.c +++ b/util-linux/fbset.c | |||
@@ -309,6 +309,7 @@ static inline void showmode(struct fb_var_screeninfo *v) | |||
309 | #ifdef STANDALONE | 309 | #ifdef STANDALONE |
310 | int main(int argc, char **argv) | 310 | int main(int argc, char **argv) |
311 | #else | 311 | #else |
312 | int fbset_main(int argc, char **argv); | ||
312 | int fbset_main(int argc, char **argv) | 313 | int fbset_main(int argc, char **argv) |
313 | #endif | 314 | #endif |
314 | { | 315 | { |
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c index 0242d8d3a..d694bd631 100644 --- a/util-linux/fdformat.c +++ b/util-linux/fdformat.c | |||
@@ -52,6 +52,7 @@ static void xioctl(int fd, int request, void *argp, const char *string) | |||
52 | } | 52 | } |
53 | } | 53 | } |
54 | 54 | ||
55 | int fdformat_main(int argc,char **argv); | ||
55 | int fdformat_main(int argc,char **argv) | 56 | int fdformat_main(int argc,char **argv) |
56 | { | 57 | { |
57 | int fd, n, cyl, read_bytes, verify; | 58 | int fd, n, cyl, read_bytes, verify; |
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index 6d827105e..66acb088f 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c | |||
@@ -2784,6 +2784,7 @@ unknown_command(int c) | |||
2784 | } | 2784 | } |
2785 | #endif | 2785 | #endif |
2786 | 2786 | ||
2787 | int fdisk_main(int argc, char **argv); | ||
2787 | int fdisk_main(int argc, char **argv) | 2788 | int fdisk_main(int argc, char **argv) |
2788 | { | 2789 | { |
2789 | char *str_b, *str_C, *str_H, *str_S; | 2790 | char *str_b, *str_C, *str_H, *str_S; |
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c index 2293d3ee6..ae341b066 100644 --- a/util-linux/freeramdisk.c +++ b/util-linux/freeramdisk.c | |||
@@ -14,6 +14,7 @@ | |||
14 | /* From <linux/fd.h> */ | 14 | /* From <linux/fd.h> */ |
15 | #define FDFLUSH _IO(2,0x4b) | 15 | #define FDFLUSH _IO(2,0x4b) |
16 | 16 | ||
17 | int freeramdisk_main(int argc, char **argv); | ||
17 | int freeramdisk_main(int argc, char **argv) | 18 | int freeramdisk_main(int argc, char **argv) |
18 | { | 19 | { |
19 | int result; | 20 | int result; |
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index 4e9365116..049bda4cc 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c | |||
@@ -1207,6 +1207,7 @@ static void check2(void) | |||
1207 | void check2(void); | 1207 | void check2(void); |
1208 | #endif | 1208 | #endif |
1209 | 1209 | ||
1210 | int fsck_minix_main(int argc, char **argv); | ||
1210 | int fsck_minix_main(int argc, char **argv) | 1211 | int fsck_minix_main(int argc, char **argv) |
1211 | { | 1212 | { |
1212 | struct termios tmp; | 1213 | struct termios tmp; |
diff --git a/util-linux/getopt.c b/util-linux/getopt.c index 64f568aa9..4861990dd 100644 --- a/util-linux/getopt.c +++ b/util-linux/getopt.c | |||
@@ -288,6 +288,7 @@ static const struct option longopts[]= | |||
288 | static const char shortopts[]="+ao:l:n:qQs:Tu"; | 288 | static const char shortopts[]="+ao:l:n:qQs:Tu"; |
289 | 289 | ||
290 | 290 | ||
291 | int getopt_main(int argc, char *argv[]); | ||
291 | int getopt_main(int argc, char *argv[]) | 292 | int getopt_main(int argc, char *argv[]) |
292 | { | 293 | { |
293 | const char *optstr = NULL; | 294 | const char *optstr = NULL; |
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c index 5cb245feb..cddd185e2 100644 --- a/util-linux/hexdump.c +++ b/util-linux/hexdump.c | |||
@@ -51,6 +51,7 @@ static const struct suffix_mult suffixes[] = { | |||
51 | {NULL, 0 } | 51 | {NULL, 0 } |
52 | }; | 52 | }; |
53 | 53 | ||
54 | int hexdump_main(int argc, char **argv); | ||
54 | int hexdump_main(int argc, char **argv) | 55 | int hexdump_main(int argc, char **argv) |
55 | { | 56 | { |
56 | const char *p; | 57 | const char *p; |
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index 8fcd8c99c..ca4238f9e 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c | |||
@@ -176,6 +176,7 @@ static int check_utc(void) | |||
176 | #define HWCLOCK_OPT_HCTOSYS 0x08 | 176 | #define HWCLOCK_OPT_HCTOSYS 0x08 |
177 | #define HWCLOCK_OPT_SYSTOHC 0x10 | 177 | #define HWCLOCK_OPT_SYSTOHC 0x10 |
178 | 178 | ||
179 | int hwclock_main(int argc, char **argv ); | ||
179 | int hwclock_main(int argc, char **argv ) | 180 | int hwclock_main(int argc, char **argv ) |
180 | { | 181 | { |
181 | unsigned opt; | 182 | unsigned opt; |
diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c index 886c2efbd..9240e2c4b 100644 --- a/util-linux/ipcrm.c +++ b/util-linux/ipcrm.c | |||
@@ -73,6 +73,7 @@ static int remove_ids(type_id type, int argc, char **argv) | |||
73 | #endif /* #ifndef CONFIG_IPCRM_DROP_LEGACY */ | 73 | #endif /* #ifndef CONFIG_IPCRM_DROP_LEGACY */ |
74 | 74 | ||
75 | 75 | ||
76 | int ipcrm_main(int argc, char **argv); | ||
76 | int ipcrm_main(int argc, char **argv) | 77 | int ipcrm_main(int argc, char **argv) |
77 | { | 78 | { |
78 | int c; | 79 | int c; |
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c index b81d07d6d..5a7b22434 100644 --- a/util-linux/ipcs.c +++ b/util-linux/ipcs.c | |||
@@ -568,6 +568,7 @@ static void print_sem(int semid) | |||
568 | puts(""); | 568 | puts(""); |
569 | } | 569 | } |
570 | 570 | ||
571 | int ipcs_main(int argc, char **argv); | ||
571 | int ipcs_main(int argc, char **argv) | 572 | int ipcs_main(int argc, char **argv) |
572 | { | 573 | { |
573 | int id = 0; | 574 | int id = 0; |
diff --git a/util-linux/losetup.c b/util-linux/losetup.c index c7eb85a91..b220c9878 100644 --- a/util-linux/losetup.c +++ b/util-linux/losetup.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include "busybox.h" | 13 | #include "busybox.h" |
14 | 14 | ||
15 | int losetup_main(int argc, char **argv); | ||
15 | int losetup_main(int argc, char **argv) | 16 | int losetup_main(int argc, char **argv) |
16 | { | 17 | { |
17 | unsigned opt; | 18 | unsigned opt; |
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index 4a0e9f9fd..f9f067dfe 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
@@ -230,6 +230,7 @@ static void find_dev(char *path) | |||
230 | closedir(dir); | 230 | closedir(dir); |
231 | } | 231 | } |
232 | 232 | ||
233 | int mdev_main(int argc, char *argv[]); | ||
233 | int mdev_main(int argc, char *argv[]) | 234 | int mdev_main(int argc, char *argv[]) |
234 | { | 235 | { |
235 | char *action; | 236 | char *action; |
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index e66ef7e17..7257ddb87 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c | |||
@@ -587,6 +587,7 @@ static void get_list_blocks(char *filename) | |||
587 | printf("%d bad block(s)\n", badblocks); | 587 | printf("%d bad block(s)\n", badblocks); |
588 | } | 588 | } |
589 | 589 | ||
590 | int mkfs_minix_main(int argc, char **argv); | ||
590 | int mkfs_minix_main(int argc, char **argv) | 591 | int mkfs_minix_main(int argc, char **argv) |
591 | { | 592 | { |
592 | struct mntent *mp; | 593 | struct mntent *mp; |
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c index 7baa3ecfb..ac894d50a 100644 --- a/util-linux/mkswap.c +++ b/util-linux/mkswap.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include "busybox.h" | 9 | #include "busybox.h" |
10 | 10 | ||
11 | int mkswap_main(int argc, char *argv[]); | ||
11 | int mkswap_main(int argc, char *argv[]) | 12 | int mkswap_main(int argc, char *argv[]) |
12 | { | 13 | { |
13 | int fd, pagesize; | 14 | int fd, pagesize; |
diff --git a/util-linux/more.c b/util-linux/more.c index d048ace92..d00cb40b8 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
@@ -38,6 +38,7 @@ static void gotsig(int sig) | |||
38 | #endif /* FEATURE_USE_TERMIOS */ | 38 | #endif /* FEATURE_USE_TERMIOS */ |
39 | 39 | ||
40 | 40 | ||
41 | int more_main(int argc, char **argv); | ||
41 | int more_main(int argc, char **argv) | 42 | int more_main(int argc, char **argv) |
42 | { | 43 | { |
43 | int c, lines, input = 0; | 44 | int c, lines, input = 0; |
diff --git a/util-linux/mount.c b/util-linux/mount.c index ba98519b6..702c0338a 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -1524,6 +1524,7 @@ report_error: | |||
1524 | 1524 | ||
1525 | const char must_be_root[] = "you must be root"; | 1525 | const char must_be_root[] = "you must be root"; |
1526 | 1526 | ||
1527 | int mount_main(int argc, char **argv); | ||
1527 | int mount_main(int argc, char **argv) | 1528 | int mount_main(int argc, char **argv) |
1528 | { | 1529 | { |
1529 | enum { OPT_ALL = 0x10 }; | 1530 | enum { OPT_ALL = 0x10 }; |
diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c index bd02302c7..97c7fa85e 100644 --- a/util-linux/pivot_root.c +++ b/util-linux/pivot_root.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | extern int pivot_root(const char * new_root,const char * put_old); | 13 | extern int pivot_root(const char * new_root,const char * put_old); |
14 | 14 | ||
15 | int pivot_root_main(int argc, char **argv); | ||
15 | int pivot_root_main(int argc, char **argv) | 16 | int pivot_root_main(int argc, char **argv) |
16 | { | 17 | { |
17 | if (argc != 3) | 18 | if (argc != 3) |
diff --git a/util-linux/rdate.c b/util-linux/rdate.c index d6d1384f7..33cf64efb 100644 --- a/util-linux/rdate.c +++ b/util-linux/rdate.c | |||
@@ -42,6 +42,7 @@ static time_t askremotedate(const char *host) | |||
42 | return ntohl(nett) - RFC_868_BIAS; | 42 | return ntohl(nett) - RFC_868_BIAS; |
43 | } | 43 | } |
44 | 44 | ||
45 | int rdate_main(int argc, char **argv); | ||
45 | int rdate_main(int argc, char **argv) | 46 | int rdate_main(int argc, char **argv) |
46 | { | 47 | { |
47 | time_t remote_time; | 48 | time_t remote_time; |
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c index dd810f021..a17b9c880 100644 --- a/util-linux/readprofile.c +++ b/util-linux/readprofile.c | |||
@@ -41,6 +41,7 @@ | |||
41 | static const char defaultmap[] = "/boot/System.map"; | 41 | static const char defaultmap[] = "/boot/System.map"; |
42 | static const char defaultpro[] = "/proc/profile"; | 42 | static const char defaultpro[] = "/proc/profile"; |
43 | 43 | ||
44 | int readprofile_main(int argc, char **argv); | ||
44 | int readprofile_main(int argc, char **argv) | 45 | int readprofile_main(int argc, char **argv) |
45 | { | 46 | { |
46 | FILE *map; | 47 | FILE *map; |
diff --git a/util-linux/setarch.c b/util-linux/setarch.c index d7e1c0917..8f4e308d4 100644 --- a/util-linux/setarch.c +++ b/util-linux/setarch.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include "busybox.h" | 17 | #include "busybox.h" |
18 | 18 | ||
19 | int setarch_main(int ATTRIBUTE_UNUSED argc, char **argv); | ||
19 | int setarch_main(int ATTRIBUTE_UNUSED argc, char **argv) | 20 | int setarch_main(int ATTRIBUTE_UNUSED argc, char **argv) |
20 | { | 21 | { |
21 | int pers = -1; | 22 | int pers = -1; |
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 8434d121c..e1de4eb0c 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c | |||
@@ -59,6 +59,7 @@ static int do_em_all(void) | |||
59 | 59 | ||
60 | #define DO_ALL 0x01 | 60 | #define DO_ALL 0x01 |
61 | 61 | ||
62 | int swap_on_off_main(int argc, char **argv); | ||
62 | int swap_on_off_main(int argc, char **argv) | 63 | int swap_on_off_main(int argc, char **argv) |
63 | { | 64 | { |
64 | int ret; | 65 | int ret; |
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index 007083bef..5a01fd6f7 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c | |||
@@ -63,6 +63,7 @@ static void delete_contents(const char *directory) | |||
63 | } else unlink(directory); | 63 | } else unlink(directory); |
64 | } | 64 | } |
65 | 65 | ||
66 | int switch_root_main(int argc, char *argv[]); | ||
66 | int switch_root_main(int argc, char *argv[]) | 67 | int switch_root_main(int argc, char *argv[]) |
67 | { | 68 | { |
68 | char *newroot, *console=NULL; | 69 | char *newroot, *console=NULL; |
diff --git a/util-linux/umount.c b/util-linux/umount.c index 6ba72aed1..4ea15d91b 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #define OPT_REMOUNT 16 | 20 | #define OPT_REMOUNT 16 |
21 | #define OPT_ALL (ENABLE_FEATURE_UMOUNT_ALL ? 32 : 0) | 21 | #define OPT_ALL (ENABLE_FEATURE_UMOUNT_ALL ? 32 : 0) |
22 | 22 | ||
23 | int umount_main(int argc, char **argv); | ||
23 | int umount_main(int argc, char **argv) | 24 | int umount_main(int argc, char **argv) |
24 | { | 25 | { |
25 | int doForce; | 26 | int doForce; |