diff options
author | Denis Vlasenko | 2007-02-03 17:28:39 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-02-03 17:28:39 +0000 |
commit | 06af2165288cd6516b89001ec9e24992619230e0 (patch) | |
tree | 840d22e507465aa6eb27c30c7ab8e80d9c469ae0 | |
parent | c7ba8b9d6c926231c1c191136b1ea0bc14b87771 (diff) | |
download | busybox-06af2165288cd6516b89001ec9e24992619230e0.zip busybox-06af2165288cd6516b89001ec9e24992619230e0.tar.gz |
suppress warnings about easch <applet>_main() having
no preceding prototype
245 files changed, 268 insertions, 25 deletions
diff --git a/applets/Kbuild b/applets/Kbuild index 8999ff0..4323e85 100644 --- a/applets/Kbuild +++ b/applets/Kbuild @@ -18,5 +18,5 @@ HOSTCFLAGS_usage.o = -I$(srctree)/include quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h cmd_gen_usage_compressed = $(srctree)/applets/usage_compressed include/usage_compressed.h applets -include/usage_compressed.h: $(srctree)/include/usage.h applets/usage +include/usage_compressed.h: .config $(srctree)/include/usage.h applets/usage $(call cmd,gen_usage_compressed) diff --git a/applets/busybox.c b/applets/busybox.c index 79634f9..99af9ca 100644 --- a/applets/busybox.c +++ b/applets/busybox.c @@ -73,6 +73,7 @@ int main(int argc, char **argv) bb_error_msg_and_die("applet not found"); } +int busybox_main(int argc, char **argv); int busybox_main(int argc, char **argv) { /* diff --git a/archival/ar.c b/archival/ar.c index 4bcf694..23d9b49 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) #define AR_OPT_CREATE 0x20 #define AR_OPT_INSERT 0x40 +int ar_main(int argc, char **argv); int ar_main(int argc, char **argv) { archive_handle_t *archive_handle; diff --git a/archival/bunzip2.c b/archival/bunzip2.c index a6cd176..1deac7b 100644 --- a/archival/bunzip2.c +++ b/archival/bunzip2.c @@ -12,6 +12,7 @@ #define BUNZIP2_OPT_STDOUT 1 #define BUNZIP2_OPT_FORCE 2 +int bunzip2_main(int argc, char **argv); int bunzip2_main(int argc, char **argv) { USE_DESKTOP(long long) int status; diff --git a/archival/cpio.c b/archival/cpio.c index 73651ba..0113867 100644 --- a/archival/cpio.c +++ b/archival/cpio.c @@ -26,6 +26,7 @@ #define CPIO_OPT_CREATE_LEADING_DIR 0x20 #define CPIO_OPT_PRESERVE_MTIME 0x40 +int cpio_main(int argc, char **argv); int cpio_main(int argc, char **argv) { archive_handle_t *archive_handle; diff --git a/archival/dpkg.c b/archival/dpkg.c index 126138f..5c69d9c 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c @@ -1566,6 +1566,7 @@ static void configure_package(deb_file_t *deb_file) set_status(status_num, "installed", 3); } +int dpkg_main(int argc, char **argv); int dpkg_main(int argc, char **argv) { deb_file_t **deb_file = NULL; diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c index c9b8a04..fde3c33 100644 --- a/archival/dpkg_deb.c +++ b/archival/dpkg_deb.c @@ -13,6 +13,7 @@ #define DPKG_DEB_OPT_EXTRACT 8 #define DPKG_DEB_OPT_EXTRACT_VERBOSE 16 +int dpkg_deb_main(int argc, char **argv); int dpkg_deb_main(int argc, char **argv) { archive_handle_t *ar_archive; diff --git a/archival/gunzip.c b/archival/gunzip.c index c5deec3..3d99fe5 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c @@ -36,6 +36,7 @@ #define GUNZIP_OPT_DECOMPRESS 8 #define GUNZIP_OPT_VERBOSE 0x10 +int gunzip_main(int argc, char **argv); int gunzip_main(int argc, char **argv) { USE_DESKTOP(long long) int status; diff --git a/archival/gzip.c b/archival/gzip.c index 2b520b3..48d1652 100644 --- a/archival/gzip.c +++ b/archival/gzip.c @@ -2086,6 +2086,7 @@ static void abort_gzip(int ATTRIBUTE_UNUSED ignored) exit(1); } +int gzip_main(int argc, char **argv); int gzip_main(int argc, char **argv) { enum { diff --git a/archival/rpm.c b/archival/rpm.c index deb87c1..9ab12df 100644 --- a/archival/rpm.c +++ b/archival/rpm.c @@ -80,6 +80,7 @@ static void fileaction_dobackup(char *filename, int fileref); static void fileaction_setowngrp(char *filename, int fileref); static void loop_through_files(int filetag, void (*fileaction)(char *filename, int fileref)); +int rpm_main(int argc, char **argv); int rpm_main(int argc, char **argv) { int opt = 0, func = 0, rpm_fd, offset; diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c index 3442046..7a2e64b 100644 --- a/archival/rpm2cpio.c +++ b/archival/rpm2cpio.c @@ -49,6 +49,7 @@ static void skip_header(int rpm_fd) } /* No getopt required */ +int rpm2cpio_main(int argc, char **argv); int rpm2cpio_main(int argc, char **argv) { struct rpm_lead lead; diff --git a/archival/tar.c b/archival/tar.c index 6c15f65..8bb8459 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -752,6 +752,7 @@ static const struct option tar_long_options[] = { }; #endif +int tar_main(int argc, char **argv); int tar_main(int argc, char **argv) { char (*get_header_ptr)(archive_handle_t *) = get_header_tar; diff --git a/archival/uncompress.c b/archival/uncompress.c index 4611790..b16c353 100644 --- a/archival/uncompress.c +++ b/archival/uncompress.c @@ -11,6 +11,7 @@ #define GUNZIP_TO_STDOUT 1 #define GUNZIP_FORCE 2 +int uncompress_main(int argc, char **argv); int uncompress_main(int argc, char **argv) { int status = EXIT_SUCCESS; diff --git a/archival/unlzma.c b/archival/unlzma.c index 20c4ff2..24632c4 100644 --- a/archival/unlzma.c +++ b/archival/unlzma.c @@ -15,6 +15,7 @@ #define UNLZMA_OPT_STDOUT 1 +int unlzma_main(int argc, char **argv); int unlzma_main(int argc, char **argv) { USE_DESKTOP(long long) int status; diff --git a/archival/unzip.c b/archival/unzip.c index b10132e..5e63170 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) return 0; } +int unzip_main(int argc, char **argv); int unzip_main(int argc, char **argv) { zip_header_t zip_header; diff --git a/console-tools/chvt.c b/console-tools/chvt.c index bbc5a9c..5090811 100644 --- a/console-tools/chvt.c +++ b/console-tools/chvt.c @@ -15,6 +15,7 @@ enum { VT_WAITACTIVE = 0x5607 /* wait for vt active */ }; +int chvt_main(int argc, char **argv); int chvt_main(int argc, char **argv) { int fd, num; diff --git a/console-tools/clear.c b/console-tools/clear.c index 9686d50..8e34d6d 100644 --- a/console-tools/clear.c +++ b/console-tools/clear.c @@ -15,6 +15,7 @@ #include "busybox.h" +int clear_main(int argc, char **argv); int clear_main(int argc, char **argv) { return printf("\033[H\033[J") != 6; diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c index cd581b1..81ea68e 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c @@ -15,6 +15,7 @@ /* From <linux/vt.h> */ enum { VT_DISALLOCATE = 0x5608 }; /* free memory associated to vt */ +int deallocvt_main(int argc, char *argv[]); int deallocvt_main(int argc, char *argv[]) { /* num = 0 deallocate all unused consoles */ diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c index 7c6633a..0c19148 100644 --- a/console-tools/dumpkmap.c +++ b/console-tools/dumpkmap.c @@ -22,18 +22,19 @@ struct kbentry { #define NR_KEYS 128 #define MAX_NR_KEYMAPS 256 +int dumpkmap_main(int argc, char **argv); int dumpkmap_main(int argc, char **argv) { struct kbentry ke; int i, j, fd; - char flags[MAX_NR_KEYMAPS], magic[] = "bkeymap"; + char flags[MAX_NR_KEYMAPS]; - if (argc >= 2 && *argv[1] == '-') + if (argc >= 2 && argv[1][0] == '-') bb_show_usage(); fd = xopen(CURRENT_VC, O_RDWR); - write(1, magic, 7); + write(1, "bkeymap", 7); /* Here we want to set everything to 0 except for indexes: * [0-2] [4-6] [8-10] [12] */ diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c index 6aa739b..f691b11 100644 --- a/console-tools/loadfont.c +++ b/console-tools/loadfont.c @@ -30,6 +30,7 @@ struct psf_header { static void loadnewfont(int fd); +int loadfont_main(int argc, char **argv); int loadfont_main(int argc, char **argv) { int fd; diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c index 74a2378..a141435 100644 --- a/console-tools/loadkmap.c +++ b/console-tools/loadkmap.c @@ -25,6 +25,7 @@ struct kbentry { #define NR_KEYS 128 #define MAX_NR_KEYMAPS 256 +int loadkmap_main(int argc, char **argv); int loadkmap_main(int argc, char **argv) { struct kbentry ke; diff --git a/console-tools/openvt.c b/console-tools/openvt.c index c7b3e4f..9296219 100644 --- a/console-tools/openvt.c +++ b/console-tools/openvt.c @@ -12,6 +12,7 @@ #include "busybox.h" +int openvt_main(int argc, char **argv); int openvt_main(int argc, char **argv) { int fd; diff --git a/console-tools/reset.c b/console-tools/reset.c index 26aab66..03b078c 100644 --- a/console-tools/reset.c +++ b/console-tools/reset.c @@ -15,6 +15,7 @@ #include <unistd.h> #include "busybox.h" +int reset_main(int argc, char **argv); int reset_main(int argc, char **argv) { if (isatty(1)) { diff --git a/console-tools/resize.c b/console-tools/resize.c index c405629..2fe5526 100644 --- a/console-tools/resize.c +++ b/console-tools/resize.c @@ -9,6 +9,7 @@ /* no options, no getopt */ #include "busybox.h" +int resize_main(int argc, char **argv); int resize_main(int argc, char **argv) { struct termios old, new; diff --git a/console-tools/setconsole.c b/console-tools/setconsole.c index ef81f29..6621d25 100644 --- a/console-tools/setconsole.c +++ b/console-tools/setconsole.c @@ -18,6 +18,7 @@ static const struct option setconsole_long_options[] = { #define OPT_SETCONS_RESET 1 +int setconsole_main(int argc, char **argv); int setconsole_main(int argc, char **argv) { unsigned long flags; diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c index d825257..ff137d5 100644 --- a/console-tools/setkeycodes.c +++ b/console-tools/setkeycodes.c @@ -9,9 +9,6 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include <stdio.h> -#include <stdlib.h> -#include <fcntl.h> #include <sys/ioctl.h> #include "busybox.h" @@ -24,8 +21,8 @@ enum { KDSETKEYCODE = 0x4B4D /* write kernel keycode table entry */ }; -extern int -setkeycodes_main(int argc, char** argv) +int setkeycodes_main(int argc, char** argv); +int setkeycodes_main(int argc, char** argv) { int fd, sc; struct kbkeycode a; diff --git a/coreutils/basename.c b/coreutils/basename.c index 30f76dc..46f7122 100644 --- a/coreutils/basename.c +++ b/coreutils/basename.c @@ -25,6 +25,7 @@ #include <string.h> #include "busybox.h" +int basename_main(int argc, char **argv); int basename_main(int argc, char **argv) { size_t m, n; diff --git a/coreutils/cal.c b/coreutils/cal.c index 82ebf14..3d61791 100644 --- a/coreutils/cal.c +++ b/coreutils/cal.c @@ -77,6 +77,7 @@ static char *build_row(char *p, int *dp); #define J_WEEK_LEN (WEEK_LEN + 7) #define HEAD_SEP 2 /* spaces between day headings */ +int cal_main(int argc, char **argv); int cal_main(int argc, char **argv) { struct tm *local_time; diff --git a/coreutils/cat.c b/coreutils/cat.c index 7a34891..7bab325 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c @@ -34,6 +34,7 @@ int bb_cat(char **argv) return retval; } +int cat_main(int argc, char **argv); int cat_main(int argc, char **argv) { getopt32(argc, argv, "u"); diff --git a/coreutils/catv.c b/coreutils/catv.c index 66f3069..826e0e9 100644 --- a/coreutils/catv.c +++ b/coreutils/catv.c @@ -12,6 +12,7 @@ #include "busybox.h" +int catv_main(int argc, char **argv); int catv_main(int argc, char **argv) { int retval = EXIT_SUCCESS, fd; diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c index 465ea0c..eaa29cb 100644 --- a/coreutils/chgrp.c +++ b/coreutils/chgrp.c @@ -16,6 +16,7 @@ /* FIXME - move to .h */ extern int chown_main(int argc, char **argv); +int chgrp_main(int argc, char **argv); int chgrp_main(int argc, char **argv) { /* "chgrp [opts] abc file(s)" == "chown [opts] :abc file(s)" */ diff --git a/coreutils/chmod.c b/coreutils/chmod.c index f298d09..74788bb 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 return FALSE; } +int chmod_main(int argc, char **argv); int chmod_main(int argc, char **argv) { int retval = EXIT_SUCCESS; diff --git a/coreutils/chown.c b/coreutils/chown.c index 09cf73f..dad5ce0 100644 --- a/coreutils/chown.c +++ b/coreutils/chown.c @@ -53,6 +53,7 @@ static int fileAction(const char *fileName, struct stat *statbuf, return FALSE; } +int chown_main(int argc, char **argv); int chown_main(int argc, char **argv) { char *groupName; diff --git a/coreutils/chroot.c b/coreutils/chroot.c index 62cfdc2..16c743f 100644 --- a/coreutils/chroot.c +++ b/coreutils/chroot.c @@ -11,6 +11,7 @@ #include "busybox.h" +int chroot_main(int argc, char **argv); int chroot_main(int argc, char **argv) { if (argc < 2) { diff --git a/coreutils/cksum.c b/coreutils/cksum.c index 5221332..66a255c 100644 --- a/coreutils/cksum.c +++ b/coreutils/cksum.c @@ -8,6 +8,7 @@ #include "busybox.h" +int cksum_main(int argc, char **argv); int cksum_main(int argc, char **argv) { diff --git a/coreutils/cmp.c b/coreutils/cmp.c index 71007ea..0aebd4b 100644 --- a/coreutils/cmp.c +++ b/coreutils/cmp.c @@ -42,6 +42,7 @@ static const char opt_chars[] = "sl"; #define CMP_OPT_s (1<<0) #define CMP_OPT_l (1<<1) +int cmp_main(int argc, char **argv); int cmp_main(int argc, char **argv) { FILE *fp1, *fp2, *outfile = stdout; diff --git a/coreutils/comm.c b/coreutils/comm.c index 91f0177..b641296 100644 --- a/coreutils/comm.c +++ b/coreutils/comm.c @@ -108,6 +108,7 @@ static void cmp_files(char **infiles) fclose(streams[1]); } +int comm_main(int argc, char **argv); int comm_main(int argc, char **argv) { unsigned long flags; diff --git a/coreutils/cp.c b/coreutils/cp.c index 47ad85e..7b0de47 100644 --- a/coreutils/cp.c +++ b/coreutils/cp.c @@ -17,6 +17,7 @@ #include "busybox.h" #include "libcoreutils/coreutils.h" +int cp_main(int argc, char **argv); int cp_main(int argc, char **argv) { struct stat source_stat; diff --git a/coreutils/cut.c b/coreutils/cut.c index a72b2c2..22014fc 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c @@ -162,6 +162,7 @@ static void cut_file(FILE * file) static const char _op_on_field[] = " only when operating on fields"; +int cut_main(int argc, char **argv); int cut_main(int argc, char **argv) { char *sopt, *ltok; diff --git a/coreutils/date.c b/coreutils/date.c index 034a18b..dfc8b2f 100644 --- a/coreutils/date.c +++ b/coreutils/date.c @@ -44,6 +44,7 @@ static void maybe_set_utc(int opt) xputenv((char*)"TZ=UTC0"); } +int date_main(int argc, char **argv); int date_main(int argc, char **argv) { time_t tm; diff --git a/coreutils/dd.c b/coreutils/dd.c index 01f37ab..4a094e8 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, #define XATOU_SFX xatoul_sfx #endif +int dd_main(int argc, char **argv); int dd_main(int argc, char **argv) { enum { diff --git a/coreutils/df.c b/coreutils/df.c index 3b32925..484cabb 100644 --- a/coreutils/df.c +++ b/coreutils/df.c @@ -33,6 +33,7 @@ static long kscale(long b, long bs) } #endif +int df_main(int argc, char **argv); int df_main(int argc, char **argv) { long blocks_used; diff --git a/coreutils/diff.c b/coreutils/diff.c index c846e2b..31c20f0 100644 --- a/coreutils/diff.c +++ b/coreutils/diff.c @@ -1170,6 +1170,7 @@ static void diffdir(char *p1, char *p2) #endif +int diff_main(int argc, char **argv); int diff_main(int argc, char **argv) { bool gotstdin = 0; diff --git a/coreutils/dirname.c b/coreutils/dirname.c index e986a97..4ecde31 100644 --- a/coreutils/dirname.c +++ b/coreutils/dirname.c @@ -14,6 +14,7 @@ #include <stdlib.h> #include "busybox.h" +int dirname_main(int argc, char **argv); int dirname_main(int argc, char **argv) { if (argc != 2) { diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c index 1ed8771..62c1361 100644 --- a/coreutils/dos2unix.c +++ b/coreutils/dos2unix.c @@ -82,6 +82,7 @@ static int convert(char *fn) return 0; } +int dos2unix_main(int argc, char *argv[]); int dos2unix_main(int argc, char *argv[]) { int o; diff --git a/coreutils/du.c b/coreutils/du.c index a4b3c81..eceb646 100644 --- a/coreutils/du.c +++ b/coreutils/du.c @@ -143,6 +143,7 @@ static long du(const char * const filename) return sum; } +int du_main(int argc, char **argv); int du_main(int argc, char **argv) { long total; diff --git a/coreutils/echo.c b/coreutils/echo.c index 0c8eac3..8270fc0 100644 --- a/coreutils/echo.c +++ b/coreutils/echo.c @@ -112,6 +112,7 @@ just_echo: return 0; } +int echo_main(int argc, char** argv); int echo_main(int argc, char** argv) { (void)bb_echo(argv); diff --git a/coreutils/env.c b/coreutils/env.c index e4cad27..04279f3 100644 --- a/coreutils/env.c +++ b/coreutils/env.c @@ -41,6 +41,7 @@ static const struct option env_long_options[] = { }; #endif +int env_main(int argc, char** argv); int env_main(int argc, char** argv) { static char *cleanenv[1] = { NULL }; diff --git a/coreutils/expr.c b/coreutils/expr.c index 469d467..62d1f3a 100644 --- a/coreutils/expr.c +++ b/coreutils/expr.c @@ -74,6 +74,7 @@ static int toarith(VALUE * v); static void freev(VALUE * v); static void tostring(VALUE * v); +int expr_main(int argc, char **argv); int expr_main(int argc, char **argv) { VALUE *v; diff --git a/coreutils/false.c b/coreutils/false.c index 084bc0c..2a26e0e 100644 --- a/coreutils/false.c +++ b/coreutils/false.c @@ -13,6 +13,7 @@ #include <stdlib.h> #include "busybox.h" +int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv); int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv) { return EXIT_FAILURE; diff --git a/coreutils/fold.c b/coreutils/fold.c index 490882f..4ce52cf 100644 --- a/coreutils/fold.c +++ b/coreutils/fold.c @@ -38,6 +38,7 @@ static int adjust_column(int column, char c) return column; } +int fold_main(int argc, char **argv); int fold_main(int argc, char **argv) { char *w_opt; diff --git a/coreutils/head.c b/coreutils/head.c index 59b4d55..ed1d01d 100644 --- a/coreutils/head.c +++ b/coreutils/head.c @@ -31,6 +31,7 @@ static const struct suffix_mult head_suffixes[] = { static const char header_fmt_str[] = "\n==> %s <==\n"; +int head_main(int argc, char **argv); int head_main(int argc, char **argv) { unsigned long count = 10; diff --git a/coreutils/hostid.c b/coreutils/hostid.c index 65447aa..51a76c6 100644 --- a/coreutils/hostid.c +++ b/coreutils/hostid.c @@ -13,6 +13,7 @@ #include <unistd.h> #include "busybox.h" +int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv); int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv) { if (argc > 1) { diff --git a/coreutils/id.c b/coreutils/id.c index 36007ae..963ee05 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) return status; } +int id_main(int argc, char **argv); int id_main(int argc, char **argv) { struct passwd *p; diff --git a/coreutils/install.c b/coreutils/install.c index c899158..dd73fb6 100644 --- a/coreutils/install.c +++ b/coreutils/install.c @@ -25,6 +25,7 @@ static const struct option install_long_options[] = { }; #endif +int install_main(int argc, char **argv); int install_main(int argc, char **argv) { struct stat statbuf; diff --git a/coreutils/length.c b/coreutils/length.c index 6413be0..1dc122c 100644 --- a/coreutils/length.c +++ b/coreutils/length.c @@ -7,6 +7,7 @@ #include <stdio.h> #include "busybox.h" +int length_main(int argc, char **argv); int length_main(int argc, char **argv) { if ((argc != 2) || (**(++argv) == '-')) { diff --git a/coreutils/ln.c b/coreutils/ln.c index a307e55..7207134 100644 --- a/coreutils/ln.c +++ b/coreutils/ln.c @@ -19,6 +19,7 @@ #define LN_BACKUP 8 #define LN_SUFFIX 16 +int ln_main(int argc, char **argv); int ln_main(int argc, char **argv) { int status = EXIT_SUCCESS; diff --git a/coreutils/logname.c b/coreutils/logname.c index 695a736..743e229 100644 --- a/coreutils/logname.c +++ b/coreutils/logname.c @@ -25,6 +25,7 @@ #include <unistd.h> #include "busybox.h" +int logname_main(int argc, char ATTRIBUTE_UNUSED **argv); int logname_main(int argc, char ATTRIBUTE_UNUSED **argv) { const char *p; diff --git a/coreutils/ls.c b/coreutils/ls.c index 067e463..798bc82 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -773,6 +773,7 @@ static const unsigned opt_flags[] = { }; +int ls_main(int argc, char **argv); int ls_main(int argc, char **argv) { struct dnode **dnd; diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c index d945ce7..417e90b 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) return hash_value; } +int md5_sha1_sum_main(int argc, char **argv); int md5_sha1_sum_main(int argc, char **argv) { int return_value = EXIT_SUCCESS; diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index 2cc9c7a..67819e7 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c @@ -29,6 +29,7 @@ static const struct option mkdir_long_options[] = { }; #endif +int mkdir_main(int argc, char **argv); int mkdir_main(int argc, char **argv) { mode_t mode = (mode_t)(-1); diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c index 24d27e7..6d8aa41 100644 --- a/coreutils/mkfifo.c +++ b/coreutils/mkfifo.c @@ -16,6 +16,7 @@ #include "busybox.h" #include "libcoreutils/coreutils.h" +int mkfifo_main(int argc, char **argv); int mkfifo_main(int argc, char **argv) { mode_t mode; diff --git a/coreutils/mknod.c b/coreutils/mknod.c index 8ca511c..6fa6d83 100644 --- a/coreutils/mknod.c +++ b/coreutils/mknod.c @@ -17,6 +17,7 @@ static const char modes_chars[] = { 'p', 'c', 'u', 'b', 0, 1, 1, 2 }; static const mode_t modes_cubp[] = { S_IFIFO, S_IFCHR, S_IFBLK }; +int mknod_main(int argc, char **argv); int mknod_main(int argc, char **argv) { mode_t mode; diff --git a/coreutils/mv.c b/coreutils/mv.c index 353124b..7d4905f 100644 --- a/coreutils/mv.c +++ b/coreutils/mv.c @@ -35,6 +35,7 @@ static const struct option mv_long_options[] = { static const char fmt[] = "cannot overwrite %sdirectory with %sdirectory"; +int mv_main(int argc, char **argv); int mv_main(int argc, char **argv) { struct stat dest_stat; diff --git a/coreutils/nice.c b/coreutils/nice.c index 2938618..b7bff6a 100644 --- a/coreutils/nice.c +++ b/coreutils/nice.c @@ -10,6 +10,7 @@ #include <sys/resource.h> #include "busybox.h" +int nice_main(int argc, char **argv); int nice_main(int argc, char **argv) { int old_priority, adjustment; diff --git a/coreutils/nohup.c b/coreutils/nohup.c index 317d2a8..a9944b7 100644 --- a/coreutils/nohup.c +++ b/coreutils/nohup.c @@ -12,6 +12,7 @@ #include "busybox.h" +int nohup_main(int argc, char **argv); int nohup_main(int argc, char **argv) { int nullfd; diff --git a/coreutils/od.c b/coreutils/od.c index ab92dac..0de9def 100644 --- a/coreutils/od.c +++ b/coreutils/od.c @@ -156,6 +156,7 @@ static const char od_o2si[] = { 0xb, 1, 8, 9, }; +int od_main(int argc, char **argv); int od_main(int argc, char **argv) { int ch; diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c index fae41af..f060c0a 100644 --- a/coreutils/od_bloaty.c +++ b/coreutils/od_bloaty.c @@ -1207,8 +1207,8 @@ dump_strings(void) check_and_close(); } -int -od_main(int argc, char **argv) +int od_main(int argc, char **argv); +int od_main(int argc, char **argv) { static const struct suffix_mult bkm[] = { { "b", 512 }, diff --git a/coreutils/printenv.c b/coreutils/printenv.c index ec50f71..1d41eeb 100644 --- a/coreutils/printenv.c +++ b/coreutils/printenv.c @@ -13,6 +13,7 @@ #include <stdlib.h> #include "busybox.h" +int printenv_main(int argc, char **argv); int printenv_main(int argc, char **argv) { extern char **environ; diff --git a/coreutils/printf.c b/coreutils/printf.c index 924499b..0180d0e 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c @@ -109,6 +109,7 @@ static void print_esc_string(char *str) } } +int printf_main(int argc, char **argv); int printf_main(int argc, char **argv) { char *format; diff --git a/coreutils/pwd.c b/coreutils/pwd.c index bd36d62..b4599b4 100644 --- a/coreutils/pwd.c +++ b/coreutils/pwd.c @@ -11,6 +11,7 @@ #include <stdlib.h> #include "busybox.h" +int pwd_main(int argc, char **argv); int pwd_main(int argc, char **argv) { char *buf; diff --git a/coreutils/realpath.c b/coreutils/realpath.c index 7fac471..b3f7e49 100644 --- a/coreutils/realpath.c +++ b/coreutils/realpath.c @@ -12,6 +12,7 @@ #include "busybox.h" +int realpath_main(int argc, char **argv); int realpath_main(int argc, char **argv) { int retval = EXIT_SUCCESS; diff --git a/coreutils/rm.c b/coreutils/rm.c index 5df7d5f..1883fee 100644 --- a/coreutils/rm.c +++ b/coreutils/rm.c @@ -18,6 +18,7 @@ #include <unistd.h> #include "busybox.h" +int rm_main(int argc, char **argv); int rm_main(int argc, char **argv) { int status = 0; diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c index c61bae7..8cbd6f1 100644 --- a/coreutils/rmdir.c +++ b/coreutils/rmdir.c @@ -15,6 +15,7 @@ #include <libgen.h> #include "busybox.h" +int rmdir_main(int argc, char **argv); int rmdir_main(int argc, char **argv) { int status = EXIT_SUCCESS; diff --git a/coreutils/seq.c b/coreutils/seq.c index f2b4706..e81a466 100644 --- a/coreutils/seq.c +++ b/coreutils/seq.c @@ -11,6 +11,7 @@ #include <stdlib.h> #include "busybox.h" +int seq_main(int argc, char **argv); int seq_main(int argc, char **argv) { double last, first, increment, i; diff --git a/coreutils/sleep.c b/coreutils/sleep.c index e32e215..b89b0fe 100644 --- a/coreutils/sleep.c +++ b/coreutils/sleep.c @@ -33,6 +33,7 @@ static const struct suffix_mult sfx[] = { }; #endif +int sleep_main(int argc, char **argv); int sleep_main(int argc, char **argv) { unsigned int duration; diff --git a/coreutils/sort.c b/coreutils/sort.c index 29cadf5..e2c7b1d 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c @@ -271,6 +271,7 @@ static unsigned str2u(char **str) } #endif +int sort_main(int argc, char **argv); int sort_main(int argc, char **argv) { FILE *fp, *outfile = stdout; diff --git a/coreutils/stat.c b/coreutils/stat.c index 31dd662..ff14a15 100644 --- a/coreutils/stat.c +++ b/coreutils/stat.c @@ -515,6 +515,7 @@ static int do_stat(char const *filename, char const *format) return 1; } +int stat_main(int argc, char **argv); int stat_main(int argc, char **argv) { int i; diff --git a/coreutils/stty.c b/coreutils/stty.c index 4e665bc..c354aac 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, #define STTY_verbose_output (1<<2) #define STTY_recoverable_output (1<<3) #define STTY_noargs (1<<4) +int stty_main(int argc, char **argv); int stty_main(int argc, char **argv) { struct termios mode; diff --git a/coreutils/sum.c b/coreutils/sum.c index d62f2cf..9327ca5 100644 --- a/coreutils/sum.c +++ b/coreutils/sum.c @@ -74,6 +74,7 @@ static unsigned sum_file(const char *file, const unsigned type) #undef buf } +int sum_main(int argc, char **argv); int sum_main(int argc, char **argv) { unsigned n; diff --git a/coreutils/sync.c b/coreutils/sync.c index 59f0b50..536c57a 100644 --- a/coreutils/sync.c +++ b/coreutils/sync.c @@ -13,6 +13,7 @@ #include <unistd.h> #include "busybox.h" +int sync_main(int argc, char **argv); int sync_main(int argc, char **argv) { bb_warn_ignoring_args(argc - 1); diff --git a/coreutils/tail.c b/coreutils/tail.c index 2a16453..52bacb7 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c @@ -68,6 +68,7 @@ static unsigned eat_num(const char *p) { return xatou_sfx(p, tail_suffixes); } +int tail_main(int argc, char **argv); int tail_main(int argc, char **argv) { unsigned count = 10; diff --git a/coreutils/tee.c b/coreutils/tee.c index 248fd14..338232c 100644 --- a/coreutils/tee.c +++ b/coreutils/tee.c @@ -13,6 +13,7 @@ #include "busybox.h" #include <signal.h> +int tee_main(int argc, char **argv); int tee_main(int argc, char **argv) { const char *mode = "w\0a"; diff --git a/coreutils/test.c b/coreutils/test.c index d3d7604..6e0d5d3 100644 --- a/coreutils/test.c +++ b/coreutils/test.c @@ -578,6 +578,7 @@ static int is_a_group_member(gid_t gid) /* applet entry point */ +int test_main(int argc, char **argv); int test_main(int argc, char **argv) { return bb_test(argc, argv); diff --git a/coreutils/touch.c b/coreutils/touch.c index 72bf904..ae4e689 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c @@ -26,6 +26,7 @@ #include <stdlib.h> #include "busybox.h" +int touch_main(int argc, char **argv); int touch_main(int argc, char **argv) { int fd; diff --git a/coreutils/tr.c b/coreutils/tr.c index 237ade0..cea3b05 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c @@ -193,6 +193,7 @@ static int complement(char *buffer, int buffer_len) return ix; } +int tr_main(int argc, char **argv); int tr_main(int argc, char **argv) { unsigned char *ptr; diff --git a/coreutils/true.c b/coreutils/true.c index 388e897..b2f3a9b 100644 --- a/coreutils/true.c +++ b/coreutils/true.c @@ -13,6 +13,7 @@ #include <stdlib.h> #include "busybox.h" +int true_main(int argc, char **argv); int true_main(int argc, char **argv) { return EXIT_SUCCESS; diff --git a/coreutils/tty.c b/coreutils/tty.c index fee4b8b..c28aa33 100644 --- a/coreutils/tty.c +++ b/coreutils/tty.c @@ -15,6 +15,7 @@ #include <unistd.h> #include "busybox.h" +int tty_main(int argc, char **argv); int tty_main(int argc, char **argv) { const char *s; diff --git a/coreutils/uname.c b/coreutils/uname.c index 5a3eafe..2faa893 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c @@ -54,6 +54,7 @@ static const unsigned short int utsname_offset[] = { offsetof(uname_info_t,processor) }; +int uname_main(int argc, char **argv); int uname_main(int argc, char **argv) { uname_info_t uname_info; diff --git a/coreutils/uniq.c b/coreutils/uniq.c index 100f2be..0cc0c83 100644 --- a/coreutils/uniq.c +++ b/coreutils/uniq.c @@ -26,6 +26,7 @@ static FILE *xgetoptfile_uniq_s(char **argv, int read0write2) return (read0write2) ? stdout : stdin; } +int uniq_main(int argc, char **argv); int uniq_main(int argc, char **argv) { FILE *in, *out; diff --git a/coreutils/usleep.c b/coreutils/usleep.c index de473a7..7dd9146 100644 --- a/coreutils/usleep.c +++ b/coreutils/usleep.c @@ -14,6 +14,7 @@ #include <unistd.h> #include "busybox.h" +int usleep_main(int argc, char **argv); int usleep_main(int argc, char **argv) { if (argc != 2) { diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index 92272a9..c195a3e 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c @@ -123,6 +123,7 @@ static void read_base64(FILE *src_stream, FILE *dst_stream) } } +int uudecode_main(int argc, char **argv); int uudecode_main(int argc, char **argv) { FILE *src_stream; diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c index e8f8d54..3207d72 100644 --- a/coreutils/uuencode.c +++ b/coreutils/uuencode.c @@ -13,6 +13,7 @@ #define SRC_BUF_SIZE 45 // This *MUST* be a multiple of 3 #define DST_BUF_SIZE 4 * ((SRC_BUF_SIZE + 2) / 3) +int uuencode_main(int argc, char **argv); int uuencode_main(int argc, char **argv) { const size_t src_buf_size = SRC_BUF_SIZE; diff --git a/coreutils/watch.c b/coreutils/watch.c index 81856c8..60a4a71 100644 --- a/coreutils/watch.c +++ b/coreutils/watch.c @@ -23,6 +23,7 @@ // // (procps 3.x and procps 2.x are forks, not newer/older versions of the same) +int watch_main(int argc, char **argv); int watch_main(int argc, char **argv) { unsigned opt; diff --git a/coreutils/wc.c b/coreutils/wc.c index d89cb45..926b3ac 100644 --- a/coreutils/wc.c +++ b/coreutils/wc.c @@ -68,6 +68,7 @@ enum { WC_LENGTH = 3 }; +int wc_main(int argc, char **argv); int wc_main(int argc, char **argv) { FILE *fp; diff --git a/coreutils/who.c b/coreutils/who.c index 4cd4265..25d35fa 100644 --- a/coreutils/who.c +++ b/coreutils/who.c @@ -38,6 +38,7 @@ static const char * idle_string (time_t t) return "old"; } +int who_main(int argc, char **argv); int who_main(int argc, char **argv) { struct utmp *ut; diff --git a/coreutils/whoami.c b/coreutils/whoami.c index df714f2..3185817 100644 --- a/coreutils/whoami.c +++ b/coreutils/whoami.c @@ -14,6 +14,7 @@ #include <unistd.h> #include "busybox.h" +int whoami_main(int argc, char **argv); int whoami_main(int argc, char **argv) { if (argc > 1) diff --git a/coreutils/yes.c b/coreutils/yes.c index fc6e611..2611c3e 100644 --- a/coreutils/yes.c +++ b/coreutils/yes.c @@ -16,6 +16,7 @@ #include "busybox.h" +int yes_main(int argc, char **argv); int yes_main(int argc, char **argv) { static const char fmt_str[] = " %s"; diff --git a/debianutils/mktemp.c b/debianutils/mktemp.c index d47d5a0..ce5bda5 100644 --- a/debianutils/mktemp.c +++ b/debianutils/mktemp.c @@ -16,6 +16,7 @@ #include <unistd.h> #include <stdlib.h> +int mktemp_main(int argc, char **argv); int mktemp_main(int argc, char **argv) { unsigned long flags = getopt32(argc, argv, "dqt"); diff --git a/debianutils/pipe_progress.c b/debianutils/pipe_progress.c index 75d26e2..51a017c 100644 --- a/debianutils/pipe_progress.c +++ b/debianutils/pipe_progress.c @@ -18,6 +18,7 @@ /* Read a block of data from stdin, write it to stdout. * Activity is indicated by a '.' to stderr */ +int pipe_progress_main(int argc, char **argv); int pipe_progress_main(int argc, char **argv) { RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE); diff --git a/debianutils/readlink.c b/debianutils/readlink.c index 4002590..8f9cfe4 100644 --- a/debianutils/readlink.c +++ b/debianutils/readlink.c @@ -13,6 +13,7 @@ #include <stdlib.h> #include <getopt.h> +int readlink_main(int argc, char **argv); int readlink_main(int argc, char **argv) { char *buf; diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c index 2b3b188..a864a05 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) /* run_parts_main */ /* Process options */ +int run_parts_main(int argc, char **argv); int run_parts_main(int argc, char **argv) { char **args = xmalloc(2 * sizeof(char *)); diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c index 9a865f6..eb2427a 100644 --- a/debianutils/start_stop_daemon.c +++ b/debianutils/start_stop_daemon.c @@ -230,6 +230,7 @@ enum { OPT_NICELEVEL = 0x80 * ENABLE_FEATURE_START_STOP_DAEMON_FANCY, }; +int start_stop_daemon_main(int argc, char **argv); int start_stop_daemon_main(int argc, char **argv) { unsigned opt; diff --git a/debianutils/which.c b/debianutils/which.c index 79b2a4f..02992d0 100644 --- a/debianutils/which.c +++ b/debianutils/which.c @@ -12,6 +12,7 @@ #include "busybox.h" +int which_main(int argc, char **argv); int which_main(int argc, char **argv) { int status = EXIT_SUCCESS; diff --git a/docs/new-applet-HOWTO.txt b/docs/new-applet-HOWTO.txt index 1c2383f..b1e1035 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: #include "busybox.h" #include <other.h> +int mu_main(int argc, char **argv); int mu_main(int argc, char **argv) { int fd; diff --git a/e2fsprogs/chattr.c b/e2fsprogs/chattr.c index f46646d..1b7942e 100644 --- a/e2fsprogs/chattr.c +++ b/e2fsprogs/chattr.c @@ -147,6 +147,7 @@ static void change_attributes(const char *name) iterate_on_dir(name, chattr_dir_proc, NULL); } +int chattr_main(int argc, char **argv); int chattr_main(int argc, char **argv) { char *arg; diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c index 8cbfc89..9ec31d2 100644 --- a/e2fsprogs/fsck.c +++ b/e2fsprogs/fsck.c @@ -1173,6 +1173,7 @@ static void signal_cancel(int sig ATTRIBUTE_UNUSED) cancel_requested = 1; } +int fsck_main(int argc, char *argv[]); int fsck_main(int argc, char *argv[]) { int i, status = 0; diff --git a/e2fsprogs/lsattr.c b/e2fsprogs/lsattr.c index f317b04..8945b53 100644 --- a/e2fsprogs/lsattr.c +++ b/e2fsprogs/lsattr.c @@ -98,6 +98,7 @@ static void lsattr_args(const char *name) } } +int lsattr_main(int argc, char **argv); int lsattr_main(int argc, char **argv) { getopt32(argc, argv, "Radlv"); diff --git a/e2fsprogs/old_e2fsprogs/chattr.c b/e2fsprogs/old_e2fsprogs/chattr.c index 4848e1e..8f62a5d 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, return 0; } +int chattr_main(int argc, char **argv); int chattr_main(int argc, char **argv) { int i; diff --git a/e2fsprogs/old_e2fsprogs/e2fsck.c b/e2fsprogs/old_e2fsprogs/e2fsck.c index 408b275..d506db2 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) static const char my_ver_string[] = E2FSPROGS_VERSION; static const char my_ver_date[] = E2FSPROGS_DATE; +int e2fsck_main (int argc, char *argv[]); int e2fsck_main (int argc, char *argv[]) { errcode_t retval; diff --git a/e2fsprogs/old_e2fsprogs/fsck.c b/e2fsprogs/old_e2fsprogs/fsck.c index da66250..ce2a968 100644 --- a/e2fsprogs/old_e2fsprogs/fsck.c +++ b/e2fsprogs/old_e2fsprogs/fsck.c @@ -1322,6 +1322,7 @@ static void PRS(int argc, char *argv[]) max_running = atoi(tmp); } +int fsck_main(int argc, char *argv[]); int fsck_main(int argc, char *argv[]) { int i, status = 0; diff --git a/e2fsprogs/old_e2fsprogs/lsattr.c b/e2fsprogs/old_e2fsprogs/lsattr.c index eb28fcb..b418f6b 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, return 0; } +int lsattr_main(int argc, char **argv); int lsattr_main(int argc, char **argv) { int i; diff --git a/e2fsprogs/old_e2fsprogs/mke2fs.c b/e2fsprogs/old_e2fsprogs/mke2fs.c index f25ecfb..45a6723 100644 --- a/e2fsprogs/old_e2fsprogs/mke2fs.c +++ b/e2fsprogs/old_e2fsprogs/mke2fs.c @@ -1176,6 +1176,7 @@ static void mke2fs_clean_up(void) if (ENABLE_FEATURE_CLEAN_UP && journal_device) free(journal_device); } +int mke2fs_main (int argc, char *argv[]); int mke2fs_main (int argc, char *argv[]) { errcode_t retval; diff --git a/e2fsprogs/old_e2fsprogs/tune2fs.c b/e2fsprogs/old_e2fsprogs/tune2fs.c index c4e084e..12af006 100644 --- a/e2fsprogs/old_e2fsprogs/tune2fs.c +++ b/e2fsprogs/old_e2fsprogs/tune2fs.c @@ -578,6 +578,7 @@ static void tune2fs_clean_up(void) if (ENABLE_FEATURE_CLEAN_UP && journal_device) free(journal_device); } +int tune2fs_main(int argc, char **argv); int tune2fs_main(int argc, char **argv) { errcode_t retval; diff --git a/editors/awk.c b/editors/awk.c index ae7ca23..9af6ecc 100644 --- a/editors/awk.c +++ b/editors/awk.c @@ -2644,6 +2644,7 @@ static rstream *next_input_file(void) return &rsm; } +int awk_main(int argc, char **argv); int awk_main(int argc, char **argv) { unsigned opt; diff --git a/editors/ed.c b/editors/ed.c index 5a48fbe..42adca4 100644 --- a/editors/ed.c +++ b/editors/ed.c @@ -40,6 +40,7 @@ static LINE *findLine(int num); static int findString(const LINE *lp, const char * str, int len, int offset); +int ed_main(int argc, char **argv); int ed_main(int argc, char **argv) { if (!initEdit()) diff --git a/editors/patch.c b/editors/patch.c index f8d7605..2c90804 100644 --- a/editors/patch.c +++ b/editors/patch.c @@ -75,6 +75,7 @@ static int file_doesnt_exist(const char *filename) return stat(filename, &statbuf); } +int patch_main(int argc, char **argv); int patch_main(int argc, char **argv) { int patch_level = -1; diff --git a/editors/sed.c b/editors/sed.c index 1572c74..b8f00c0 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -1215,6 +1215,7 @@ static void add_files_link(llist_t *opt_f) free(opt_f); } +int sed_main(int argc, char **argv); int sed_main(int argc, char **argv) { enum { diff --git a/editors/vi.c b/editors/vi.c index 46181cf..45a8051 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -264,6 +264,7 @@ static void write1(const char *out) fputs(out, stdout); } +int vi_main(int argc, char **argv); int vi_main(int argc, char **argv) { int c; diff --git a/findutils/find.c b/findutils/find.c index d71af9c..b4ef7cb 100644 --- a/findutils/find.c +++ b/findutils/find.c @@ -543,6 +543,7 @@ static action*** parse_params(char **argv) } +int find_main(int argc, char **argv); int find_main(int argc, char **argv) { int dereference = FALSE; diff --git a/findutils/grep.c b/findutils/grep.c index 76f6562..f4652fa 100644 --- a/findutils/grep.c +++ b/findutils/grep.c @@ -321,6 +321,7 @@ static int grep_dir(const char *dir) } +int grep_main(int argc, char **argv); int grep_main(int argc, char **argv) { FILE *file; diff --git a/findutils/xargs.c b/findutils/xargs.c index 077b884..c2060f8 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c @@ -387,6 +387,7 @@ enum { USE_FEATURE_XARGS_SUPPORT_TERMOPT( "x") \ USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( "0") +int xargs_main(int argc, char **argv); int xargs_main(int argc, char **argv) { char **args; diff --git a/include/libbb.h b/include/libbb.h index 85afdf2..d733271 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -495,11 +495,14 @@ extern void bb_vinfo_msg(const char *s, va_list p); /* applets which are useful from another applets */ -extern int bb_cat(char** argv); -extern int bb_echo(char** argv); -extern int bb_test(int argc, char** argv); +int bb_cat(char** argv); +int bb_echo(char** argv); +int bb_test(int argc, char** argv); #if ENABLE_ROUTE -extern void bb_displayroutes(int noresolve, int netstatfmt); +void bb_displayroutes(int noresolve, int netstatfmt); +#endif +#if ENABLE_GUNZIP +int gunzip_main(int argc, char **argv); #endif diff --git a/init/halt.c b/init/halt.c index a6cf48b..d5c22a8 100644 --- a/init/halt.c +++ b/init/halt.c @@ -10,6 +10,7 @@ #include "busybox.h" #include <sys/reboot.h> +int halt_main(int argc, char *argv[]); int halt_main(int argc, char *argv[]) { static const int magic[] = { diff --git a/init/init.c b/init/init.c index dc87524..ce1f739 100644 --- a/init/init.c +++ b/init/init.c @@ -968,6 +968,7 @@ static void reload_signal(int sig ATTRIBUTE_UNUSED) } #endif /* FEATURE_USE_INITTAB */ +int init_main(int argc, char **argv); int init_main(int argc, char **argv) { struct init_action *a; diff --git a/init/mesg.c b/init/mesg.c index 658c824..40d8ae3 100644 --- a/init/mesg.c +++ b/init/mesg.c @@ -15,6 +15,7 @@ #define S_IWGRP_OR_S_IWOTH (S_IWGRP | S_IWOTH) #endif +int mesg_main(int argc, char *argv[]); int mesg_main(int argc, char *argv[]) { struct stat sb; diff --git a/libbb/get_console.c b/libbb/get_console.c index 52ae3d2..62a1739 100644 --- a/libbb/get_console.c +++ b/libbb/get_console.c @@ -59,8 +59,8 @@ int get_console_fd(void) char arg; fd4name = open_a_console(choise_console_names[fd]); - chk_std: - choise_fd = fd4name >= 0 ? fd4name : fd; + chk_std: + choise_fd = (fd4name >= 0 ? fd4name : fd); arg = 0; if (ioctl(choise_fd, KDGKBTYPE, &arg) == 0) diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c index 0172e60..768d2c0 100644 --- a/loginutils/addgroup.c +++ b/loginutils/addgroup.c @@ -84,6 +84,7 @@ static int addgroup(char *group, gid_t gid, const char *user) * * can be customized via command-line parameters. * ________________________________________________________________________ */ +int addgroup_main(int argc, char **argv); int addgroup_main(int argc, char **argv) { char *group; diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 5a48e9c..8193aea 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c @@ -158,6 +158,7 @@ static int adduser(struct passwd *p, unsigned long flags) * * can be customized via command-line parameters. */ +int adduser_main(int argc, char **argv); int adduser_main(int argc, char **argv) { struct passwd pw; diff --git a/loginutils/deluser.c b/loginutils/deluser.c index 034ab94..e9bde00 100644 --- a/loginutils/deluser.c +++ b/loginutils/deluser.c @@ -61,6 +61,7 @@ static void del_line_matching(const char *login, const char *filename) } } +int deluser_main(int argc, char **argv); int deluser_main(int argc, char **argv) { if (argc != 2) diff --git a/loginutils/getty.c b/loginutils/getty.c index 8f81caf..64d2d08 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -711,6 +711,7 @@ static void update_utmp(const char *line) #endif /* SYSV_STYLE */ +int getty_main(int argc, char **argv); int getty_main(int argc, char **argv) { int nullfd; diff --git a/loginutils/login.c b/loginutils/login.c index 94bb0dd..a19191b 100644 --- a/loginutils/login.c +++ b/loginutils/login.c @@ -211,6 +211,7 @@ static void alarm_handler(int sig ATTRIBUTE_UNUSED) exit(EXIT_SUCCESS); } +int login_main(int argc, char **argv); int login_main(int argc, char **argv) { enum { diff --git a/loginutils/passwd.c b/loginutils/passwd.c index ab20f28..4531e63 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c @@ -229,6 +229,7 @@ static int update_passwd(const char *filename, const char *username, } +int passwd_main(int argc, char **argv); int passwd_main(int argc, char **argv) { enum { diff --git a/loginutils/su.c b/loginutils/su.c index 9a134dd..0a786cb 100644 --- a/loginutils/su.c +++ b/loginutils/su.c @@ -11,6 +11,7 @@ #define SU_OPT_mp (3) #define SU_OPT_l (4) +int su_main(int argc, char **argv); int su_main(int argc, char **argv) { unsigned flags; diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index 8bcb393..8e3095c 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c @@ -34,6 +34,7 @@ static void catchalarm(int ATTRIBUTE_UNUSED junk) } +int sulogin_main(int argc, char **argv); int sulogin_main(int argc, char **argv) { char *cp; diff --git a/loginutils/vlock.c b/loginutils/vlock.c index 7cc812f..06a7169 100644 --- a/loginutils/vlock.c +++ b/loginutils/vlock.c @@ -41,6 +41,7 @@ static void restore_terminal(void) tcsetattr(STDIN_FILENO, TCSANOW, &oterm); } +int vlock_main(int argc, char **argv); int vlock_main(int argc, char **argv) { sigset_t sig; diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index b35538a..985ee2d 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c @@ -38,6 +38,7 @@ static const char * const ret_code_descript[] = { "leap second has occurred", "clock not synchronized" }; +int adjtimex_main(int argc, char **argv); int adjtimex_main(int argc, char **argv) { enum { diff --git a/miscutils/bbconfig.c b/miscutils/bbconfig.c index ce14d4a..6896506 100644 --- a/miscutils/bbconfig.c +++ b/miscutils/bbconfig.c @@ -4,6 +4,7 @@ #include "busybox.h" #include "bbconfigopts.h" +int bbconfig_main(int argc, char **argv); int bbconfig_main(int argc, char **argv) { printf(bbconfig_config); diff --git a/miscutils/crond.c b/miscutils/crond.c index aace3ee..d237a67 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c @@ -131,6 +131,7 @@ static void crondlog(const char *ctl, ...) } } +int crond_main(int ac, char **av); int crond_main(int ac, char **av) { unsigned opt; diff --git a/miscutils/crontab.c b/miscutils/crontab.c index eb7c205..02df85b 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c @@ -31,6 +31,7 @@ static void EditFile(const char *user, const char *file); static int GetReplaceStream(const char *user, const char *file); static int ChangeUser(const char *user, short dochdir); +int crontab_main(int ac, char **av); int crontab_main(int ac, char **av) { enum { NONE, EDIT, LIST, REPLACE, DELETE } option = NONE; diff --git a/miscutils/dc.c b/miscutils/dc.c index 7b64057..2121f76 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c @@ -200,6 +200,7 @@ static int number_of_tokens(char *buffer) return i; } +int dc_main(int argc, char **argv); int dc_main(int argc, char **argv) { /* take stuff from stdin if no args are given */ diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index 7c604f6..69c6987 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) /* Public functions follow */ +int devfsd_main (int argc, char **argv); int devfsd_main (int argc, char **argv) { int print_version = FALSE; diff --git a/miscutils/eject.c b/miscutils/eject.c index 8e37c84..5d7ef1c 100644 --- a/miscutils/eject.c +++ b/miscutils/eject.c @@ -25,6 +25,7 @@ #define FLAG_CLOSE 1 #define FLAG_SMART 2 +int eject_main(int argc, char **argv); int eject_main(int argc, char **argv) { unsigned long flags; diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index afb4ecc..eafb078 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" /*-------------------------------------*/ /* our main() routine: */ +int hdparm_main(int argc, char **argv) ATTRIBUTE_NORETURN;; int hdparm_main(int argc, char **argv) ATTRIBUTE_NORETURN; +int hdparm_main(int argc, char **argv); int hdparm_main(int argc, char **argv) { int c; diff --git a/miscutils/last.c b/miscutils/last.c index fd1033b..d354807 100644 --- a/miscutils/last.c +++ b/miscutils/last.c @@ -26,6 +26,7 @@ #error struct utmp member char[] size(s) have changed! #endif +int last_main(int argc, char **argv); int last_main(int argc, char **argv) { struct utmp ut; diff --git a/miscutils/less.c b/miscutils/less.c index 20da022..9aae81f 100644 --- a/miscutils/less.c +++ b/miscutils/less.c @@ -1181,6 +1181,7 @@ static void sig_catcher(int sig ATTRIBUTE_UNUSED) exit(1); } +int less_main(int argc, char **argv); int less_main(int argc, char **argv) { int keypress; diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index 5602c22..aa000a7 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c @@ -10,6 +10,7 @@ #include "busybox.h" #ifdef CONFIG_FEATURE_MAKEDEVS_LEAF +int makedevs_main(int argc, char **argv); int makedevs_main(int argc, char **argv) { mode_t mode; @@ -68,6 +69,7 @@ int makedevs_main(int argc, char **argv) /* Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */ +int makedevs_main(int argc, char **argv); int makedevs_main(int argc, char **argv) { FILE *table = stdin; diff --git a/miscutils/mountpoint.c b/miscutils/mountpoint.c index b1bcab6..e380154 100644 --- a/miscutils/mountpoint.c +++ b/miscutils/mountpoint.c @@ -11,6 +11,7 @@ #include "busybox.h" +int mountpoint_main(int argc, char **argv); int mountpoint_main(int argc, char **argv) { struct stat st; diff --git a/miscutils/mt.c b/miscutils/mt.c index a4b527f..bed2969 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c @@ -50,6 +50,7 @@ static const struct mt_opcodes opcodes[] = { {0, 0} }; +int mt_main(int argc, char **argv); int mt_main(int argc, char **argv) { const char *file = "/dev/tape"; diff --git a/miscutils/nmeter.c b/miscutils/nmeter.c index 966131a..efc78d7 100644 --- a/miscutils/nmeter.c +++ b/miscutils/nmeter.c @@ -729,6 +729,7 @@ static init_func* init_functions[] = { init_cr, }; +int nmeter_main(int argc, char* argv[]); int nmeter_main(int argc, char* argv[]) { char buf[32]; diff --git a/miscutils/raidautorun.c b/miscutils/raidautorun.c index e5bce9a..c95b00a 100644 --- a/miscutils/raidautorun.c +++ b/miscutils/raidautorun.c @@ -13,6 +13,7 @@ #include <linux/major.h> #include <linux/raid/md_u.h> +int raidautorun_main(int argc, char **argv); int raidautorun_main(int argc, char **argv) { if (argc != 2) diff --git a/miscutils/readahead.c b/miscutils/readahead.c index 356c404..601e845 100644 --- a/miscutils/readahead.c +++ b/miscutils/readahead.c @@ -12,6 +12,7 @@ #include "busybox.h" +int readahead_main(int argc, char **argv); int readahead_main(int argc, char **argv) { FILE *f; diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c index 91d49fa..23714f7 100644 --- a/miscutils/runlevel.c +++ b/miscutils/runlevel.c @@ -18,6 +18,7 @@ #include <time.h> #include <stdlib.h> +int runlevel_main(int argc, char *argv[]); int runlevel_main(int argc, char *argv[]) { struct utmp *ut; diff --git a/miscutils/rx.c b/miscutils/rx.c index 6fb23b9..29848b1 100644 --- a/miscutils/rx.c +++ b/miscutils/rx.c @@ -248,6 +248,7 @@ static void sigalrm_handler(int ATTRIBUTE_UNUSED signum) { } +int rx_main(int argc, char **argv); int rx_main(int argc, char **argv) { char *fn; diff --git a/miscutils/setsid.c b/miscutils/setsid.c index 47c44d2..b4d5ced 100644 --- a/miscutils/setsid.c +++ b/miscutils/setsid.c @@ -16,6 +16,7 @@ #include "busybox.h" +int setsid_main(int argc, char *argv[]); int setsid_main(int argc, char *argv[]) { if (argc < 2) diff --git a/miscutils/strings.c b/miscutils/strings.c index 691502d..49f2cf3 100644 --- a/miscutils/strings.c +++ b/miscutils/strings.c @@ -18,6 +18,7 @@ #define PRINT_OFFSET 4 #define SIZE 8 +int strings_main(int argc, char **argv); int strings_main(int argc, char **argv) { int n, c, i = 0, status = EXIT_SUCCESS; diff --git a/miscutils/taskset.c b/miscutils/taskset.c index 28be31a..cf6a8be 100644 --- a/miscutils/taskset.c +++ b/miscutils/taskset.c @@ -41,6 +41,7 @@ static char *__from_cpuset(cpu_set_t *mask) #define OPT_p 1 +int taskset_main(int argc, char** argv); int taskset_main(int argc, char** argv) { cpu_set_t mask, new_mask; diff --git a/miscutils/time.c b/miscutils/time.c index df10eeb..56f1d4a 100644 --- a/miscutils/time.c +++ b/miscutils/time.c @@ -427,6 +427,7 @@ static void run_command(char *const *cmd, resource_t * resp) signal(SIGQUIT, quit_signal); } +int time_main(int argc, char **argv); int time_main(int argc, char **argv) { resource_t res; diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index e342c13..9dbefb9 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c @@ -23,6 +23,7 @@ static void watchdog_shutdown(int ATTRIBUTE_UNUSED unused) exit(0); } +int watchdog_main(int argc, char **argv); int watchdog_main(int argc, char **argv) { unsigned opts; diff --git a/modutils/insmod.c b/modutils/insmod.c index edbdfab..57092f7 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c @@ -3945,6 +3945,7 @@ static void print_load_map(struct obj_file *f) void print_load_map(struct obj_file *f); #endif +int insmod_main( int argc, char **argv); int insmod_main( int argc, char **argv) { char *opt_o, *arg1; @@ -4258,6 +4259,7 @@ static const char *moderror(int err) } } +int insmod_ng_main(int argc, char **argv); int insmod_ng_main(int argc, char **argv) { long ret; diff --git a/modutils/lsmod.c b/modutils/lsmod.c index af16f2c..31549b9 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c @@ -74,6 +74,7 @@ enum { NEW_MOD_INITIALIZING = 64 }; +int lsmod_main(int argc, char **argv); int lsmod_main(int argc, char **argv) { struct module_info info; @@ -139,6 +140,7 @@ int lsmod_main(int argc, char **argv) #else /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */ +int lsmod_main(int argc, char **argv); int lsmod_main(int argc, char **argv) { FILE *file = xfopen("/proc/modules", "r"); diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 94f7b22..d5b5dd4 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -861,6 +861,7 @@ static int mod_remove(char *mod) return rc; } +int modprobe_main(int argc, char** argv); int modprobe_main(int argc, char** argv) { int rc = EXIT_SUCCESS; diff --git a/modutils/rmmod.c b/modutils/rmmod.c index 22e864d..0a67b89 100644 --- a/modutils/rmmod.c +++ b/modutils/rmmod.c @@ -38,6 +38,7 @@ void filename2modname(char *modname, const char *afterslash); int query_module(const char *name, int which, void *buf, size_t bufsize, size_t *ret); +int rmmod_main(int argc, char **argv); int rmmod_main(int argc, char **argv) { int n, ret = EXIT_SUCCESS; diff --git a/networking/arp.c b/networking/arp.c index 33191d8..2af6bc9 100644 --- a/networking/arp.c +++ b/networking/arp.c @@ -441,6 +441,7 @@ static int arp_show(char *name) return 0; } +int arp_main(int argc, char **argv); int arp_main(int argc, char **argv) { char *hw_type; diff --git a/networking/arping.c b/networking/arping.c index 7bab0d0..20c782f 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) return 1; } +int arping_main(int argc, char **argv); int arping_main(int argc, char **argv) { const char *device = "eth0"; diff --git a/networking/dnsd.c b/networking/dnsd.c index 6a866f1..6d1335e 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c @@ -330,6 +330,7 @@ static void interrupt(int x) exit(2); } +int dnsd_main(int argc, char **argv); int dnsd_main(int argc, char **argv) { char *listen_interface = NULL; diff --git a/networking/ether-wake.c b/networking/ether-wake.c index f923149..73f693e 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); static inline int get_fill(unsigned char *pkt, struct ether_addr *eaddr, int broadcast); static inline int get_wol_pw(const char *ethoptarg, unsigned char *wol_passwd); +int ether_wake_main(int argc, char *argv[]); int ether_wake_main(int argc, char *argv[]) { const char *ifname = "eth0"; diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index 590b7eb..dad1c99 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c @@ -297,6 +297,7 @@ static const struct option ftpgetput_long_options[] = { }; #endif +int ftpgetput_main(int argc, char **argv); int ftpgetput_main(int argc, char **argv) { /* content-length of the file */ diff --git a/networking/hostname.c b/networking/hostname.c index 45aaaa4..3f6a658 100644 --- a/networking/hostname.c +++ b/networking/hostname.c @@ -41,6 +41,7 @@ static void do_sethostname(char *s, int isfile) } } +int hostname_main(int argc, char **argv); int hostname_main(int argc, char **argv) { enum { diff --git a/networking/httpd.c b/networking/httpd.c index e3f798c..fb363c5 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -1902,6 +1902,7 @@ static const char httpd_opts[] = "c:d:h:" "p:if"; +int httpd_main(int argc, char *argv[]); int httpd_main(int argc, char *argv[]) { unsigned opt; diff --git a/networking/ifconfig.c b/networking/ifconfig.c index 9cdd41c..b36f86d 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c @@ -261,6 +261,7 @@ static int in_ether(const char *bufp, struct sockaddr *sap); * Our main function. */ +int ifconfig_main(int argc, char **argv); int ifconfig_main(int argc, char **argv) { struct ifreq ifr; diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 834c7fa..ce3b9ba 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) return NULL; } +int ifupdown_main(int argc, char **argv); int ifupdown_main(int argc, char **argv) { int (*cmds)(struct interface_defn_t *) = NULL; diff --git a/networking/inetd.c b/networking/inetd.c index 5e7005e..c037d11 100644 --- a/networking/inetd.c +++ b/networking/inetd.c @@ -1246,8 +1246,8 @@ inetd_setproctitle(char *a, int s) #endif -int -inetd_main(int argc, char *argv[]) +int inetd_main(int argc, char *argv[]); +int inetd_main(int argc, char *argv[]) { servtab_t *sep; struct passwd *pwd; diff --git a/networking/ip.c b/networking/ip.c index 7a7f55c..fdd8480 100644 --- a/networking/ip.c +++ b/networking/ip.c @@ -17,6 +17,7 @@ #include "libiproute/utils.h" #include "libiproute/ip_common.h" +int ip_main(int argc, char **argv); int ip_main(int argc, char **argv) { int ret = EXIT_FAILURE; diff --git a/networking/ipaddr.c b/networking/ipaddr.c index c907808..fb02137 100644 --- a/networking/ipaddr.c +++ b/networking/ipaddr.c @@ -17,6 +17,7 @@ #include "busybox.h" +int ipaddr_main(int argc, char **argv); int ipaddr_main(int argc, char **argv) { ip_parse_common_args(&argc, &argv); diff --git a/networking/ipcalc.c b/networking/ipcalc.c index 685f0e3..63ce99f 100644 --- a/networking/ipcalc.c +++ b/networking/ipcalc.c @@ -76,6 +76,7 @@ int get_prefix(unsigned long netmask); }; #endif +int ipcalc_main(int argc, char **argv); int ipcalc_main(int argc, char **argv) { unsigned opt; diff --git a/networking/iplink.c b/networking/iplink.c index 4a28c74..54087e9 100644 --- a/networking/iplink.c +++ b/networking/iplink.c @@ -17,6 +17,7 @@ #include "busybox.h" +int iplink_main(int argc, char **argv); int iplink_main(int argc, char **argv) { ip_parse_common_args(&argc, &argv); diff --git a/networking/iproute.c b/networking/iproute.c index 62335a8..3d540b2 100644 --- a/networking/iproute.c +++ b/networking/iproute.c @@ -17,6 +17,7 @@ #include "busybox.h" +int iproute_main(int argc, char **argv); int iproute_main(int argc, char **argv) { ip_parse_common_args(&argc, &argv); diff --git a/networking/iprule.c b/networking/iprule.c index 43eaea6..9c1fb50 100644 --- a/networking/iprule.c +++ b/networking/iprule.c @@ -17,6 +17,7 @@ #include "busybox.h" +int iprule_main(int argc, char **argv); int iprule_main(int argc, char **argv) { ip_parse_common_args(&argc, &argv); diff --git a/networking/iptunnel.c b/networking/iptunnel.c index 9ae734a..8a65413 100644 --- a/networking/iptunnel.c +++ b/networking/iptunnel.c @@ -17,6 +17,7 @@ #include "busybox.h" +int iptunnel_main(int argc, char **argv); int iptunnel_main(int argc, char **argv) { ip_parse_common_args(&argc, &argv); diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c index 2d4399c..f9ab0b2 100644 --- a/networking/isrv_identd.c +++ b/networking/isrv_identd.c @@ -92,6 +92,7 @@ static void inetd_mode(void) while (do_rd(0, (void*)&buf) == 0); } +int fakeidentd_main(int argc, char **argv); int fakeidentd_main(int argc, char **argv) { enum { diff --git a/networking/nameif.c b/networking/nameif.c index 52aad28..ec77512 100644 --- a/networking/nameif.c +++ b/networking/nameif.c @@ -55,6 +55,7 @@ static struct ether_addr *cc_macaddr(const char *str_macaddr) return mac; } +int nameif_main(int argc, char **argv); int nameif_main(int argc, char **argv) { mactable_t *clist = NULL; diff --git a/networking/nc.c b/networking/nc.c index dc9102b..c1e8811 100644 --- a/networking/nc.c +++ b/networking/nc.c @@ -18,6 +18,7 @@ static void timeout(int signum) bb_error_msg_and_die("timed out"); } +int nc_main(int argc, char **argv); int nc_main(int argc, char **argv) { /* sfd sits _here_ only because of "repeat" option (-l -l). */ diff --git a/networking/netstat.c b/networking/netstat.c index a5631c3..d89d3aa 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 * Our main function. */ +int netstat_main(int argc, char **argv); int netstat_main(int argc, char **argv) { enum { diff --git a/networking/nslookup.c b/networking/nslookup.c index 914f3f5..14c05b3 100644 --- a/networking/nslookup.c +++ b/networking/nslookup.c @@ -128,6 +128,7 @@ static void set_default_dns(char *server) } } +int nslookup_main(int argc, char **argv); int nslookup_main(int argc, char **argv) { /* We allow 1 or 2 arguments. diff --git a/networking/ping.c b/networking/ping.c index ba4f585..d0e6f3a 100644 --- a/networking/ping.c +++ b/networking/ping.c @@ -185,6 +185,7 @@ static void ping6(len_and_sockaddr *lsa) } #endif +int ping_main(int argc, char **argv); int ping_main(int argc, char **argv) { len_and_sockaddr *lsa; @@ -715,6 +716,7 @@ static int parse_nipquad(const char *str, struct sockaddr_in* addr) return 1; /* error */ } +int ping_main(int argc, char **argv); int ping_main(int argc, char **argv) { len_and_sockaddr *lsa; @@ -759,6 +761,7 @@ int ping_main(int argc, char **argv) #if ENABLE_PING6 +int ping6_main(int argc, char **argv); int ping6_main(int argc, char **argv) { argv[0] = (char*)"-6"; diff --git a/networking/route.c b/networking/route.c index d32011c..0697390 100644 --- a/networking/route.c +++ b/networking/route.c @@ -638,6 +638,7 @@ static const char tbl_verb[] = /* 2nd byte matches RTACTION_* code */ "\010\002delete" /* Since last, we can save a byte. */ ; +int route_main(int argc, char **argv); int route_main(int argc, char **argv) { unsigned opt; diff --git a/networking/telnet.c b/networking/telnet.c index 7407fa4..2a6457f 100644 --- a/networking/telnet.c +++ b/networking/telnet.c @@ -581,6 +581,7 @@ static void cookmode(void) if (G.do_termios) tcsetattr(0, TCSADRAIN, &G.termios_def); } +int telnet_main(int argc, char** argv); int telnet_main(int argc, char** argv) { char *host; diff --git a/networking/telnetd.c b/networking/telnetd.c index 25cba3e..ef9b1ac 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c @@ -360,8 +360,8 @@ void free_session(struct tsession *ts); #endif -int -telnetd_main(int argc, char **argv) +int telnetd_main(int argc, char **argv); +int telnetd_main(int argc, char **argv) { fd_set rdfdset, wrfdset; unsigned opt; diff --git a/networking/tftp.c b/networking/tftp.c index eb192d8..a6d85a5 100644 --- a/networking/tftp.c +++ b/networking/tftp.c @@ -435,6 +435,7 @@ static int tftp( return finished ? EXIT_SUCCESS : EXIT_FAILURE; } +int tftp_main(int argc, char **argv); int tftp_main(int argc, char **argv) { len_and_sockaddr *peer_lsa; diff --git a/networking/traceroute.c b/networking/traceroute.c index 25c6569..4ddde2f 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c @@ -886,8 +886,8 @@ getaddr(uint32_t *ap, const char *host) #endif -int -traceroute_main(int argc, char *argv[]) +int traceroute_main(int argc, char *argv[]); +int traceroute_main(int argc, char *argv[]) { int code, n; unsigned char *outp; diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index e48e1f2..a59c5db 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) } +int udhcpc_main(int argc, char *argv[]); int udhcpc_main(int argc, char *argv[]) { uint8_t *temp, *message; diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index 7d0b8fa..90d8f0d 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c @@ -20,6 +20,7 @@ struct dhcpOfferedAddr *leases; struct server_config_t server_config; +int udhcpd_main(int argc, char *argv[]); int udhcpd_main(int argc, char *argv[]) { fd_set rfds; diff --git a/networking/udhcp/dhcprelay.c b/networking/udhcp/dhcprelay.c index 418aa7c..9bb7aea 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 } } +int dhcprelay_main(int argc, char **argv); int dhcprelay_main(int argc, char **argv) { int i, num_sockets, max_socket, fds[MAX_INTERFACES]; diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index a0e81bb..ce73c47 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c @@ -11,6 +11,7 @@ #define REMAINING 0 #define ABSOLUTE 1 +int dumpleases_main(int argc, char *argv[]); int dumpleases_main(int argc, char *argv[]) { int fp; diff --git a/networking/vconfig.c b/networking/vconfig.c index 003c1a8..06c06cb 100644 --- a/networking/vconfig.c +++ b/networking/vconfig.c @@ -106,6 +106,7 @@ static const char name_types[] = { static const char conf_file_name[] = "/proc/net/vlan/config"; +int vconfig_main(int argc, char **argv); int vconfig_main(int argc, char **argv) { struct vlan_ioctl_args ifr; diff --git a/networking/wget.c b/networking/wget.c index 432756c..e1a4bab 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -86,6 +86,7 @@ static char *base64enc(unsigned char *p, char *buf, int len) } #endif +int wget_main(int argc, char **argv); int wget_main(int argc, char **argv) { char buf[512]; diff --git a/networking/zcip.c b/networking/zcip.c index b568706..e3755a9 100644 --- a/networking/zcip.c +++ b/networking/zcip.c @@ -204,6 +204,7 @@ static int ready; // = 0; static int verbose; // = 0; static int state = PROBE; +int zcip_main(int argc, char *argv[]); int zcip_main(int argc, char *argv[]) { struct ether_addr eth_addr; diff --git a/procps/free.c b/procps/free.c index 84432e0..860f573 100644 --- a/procps/free.c +++ b/procps/free.c @@ -11,6 +11,7 @@ #include "busybox.h" +int free_main(int argc, char **argv); int free_main(int argc, char **argv) { struct sysinfo info; diff --git a/procps/fuser.c b/procps/fuser.c index 9752af7..c91ae21 100644 --- a/procps/fuser.c +++ b/procps/fuser.c @@ -301,6 +301,7 @@ static int fuser_kill_pid_list(pid_list *plist, int sig) return success; } +int fuser_main(int argc, char **argv); int fuser_main(int argc, char **argv) { int port, i, optn; diff --git a/procps/kill.c b/procps/kill.c index 5b16732..9a6e936 100644 --- a/procps/kill.c +++ b/procps/kill.c @@ -10,6 +10,7 @@ #include "busybox.h" +int kill_main(int argc, char **argv); int kill_main(int argc, char **argv) { char *arg; diff --git a/procps/pidof.c b/procps/pidof.c index 1d97189..ea2520a 100644 --- a/procps/pidof.c +++ b/procps/pidof.c @@ -16,6 +16,7 @@ enum { OPT_OMIT = USE_FEATURE_PIDOF_OMIT( (1<<OPTBIT_OMIT )) + 0, }; +int pidof_main(int argc, char **argv); int pidof_main(int argc, char **argv) { unsigned first = 1; diff --git a/procps/ps.c b/procps/ps.c index acd9a30..f3d11b7 100644 --- a/procps/ps.c +++ b/procps/ps.c @@ -233,6 +233,7 @@ static void format_process(const procps_status_t *ps) /* Cannot be const: parse_o() will choke */ static char default_o[] = "pid,user" /* TODO: ,vsz,stat */ ",args"; +int ps_main(int argc, char **argv); int ps_main(int argc, char **argv) { procps_status_t *p; @@ -280,6 +281,7 @@ int ps_main(int argc, char **argv) #else /* !ENABLE_DESKTOP */ +int ps_main(int argc, char **argv); int ps_main(int argc, char **argv) { procps_status_t *p = NULL; diff --git a/procps/renice.c b/procps/renice.c index 08e0dc2..2964e20 100644 --- a/procps/renice.c +++ b/procps/renice.c @@ -26,6 +26,7 @@ void BUG_bad_PRIO_PROCESS(void); void BUG_bad_PRIO_PGRP(void); void BUG_bad_PRIO_USER(void); +int renice_main(int argc, char **argv); int renice_main(int argc, char **argv) { static const char Xetpriority_msg[] = "%cetpriority"; diff --git a/procps/sysctl.c b/procps/sysctl.c index 4975448..b5a0189 100644 --- a/procps/sysctl.c +++ b/procps/sysctl.c @@ -56,6 +56,7 @@ static void dwrite_str(int fd, const char *buf) /* * sysctl_main()... */ +int sysctl_main(int argc, char **argv); int sysctl_main(int argc, char **argv) { int retval = 0; diff --git a/procps/top.c b/procps/top.c index 7125443..2681f97 100644 --- a/procps/top.c +++ b/procps/top.c @@ -411,6 +411,7 @@ static void sig_catcher(int sig ATTRIBUTE_UNUSED) #endif /* FEATURE_USE_TERMIOS */ +int top_main(int argc, char **argv); int top_main(int argc, char **argv) { int count, lines, col; diff --git a/procps/uptime.c b/procps/uptime.c index 37c9d44..3573ffe 100644 --- a/procps/uptime.c +++ b/procps/uptime.c @@ -25,6 +25,7 @@ #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100) +int uptime_main(int argc, char **argv); int uptime_main(int argc, char **argv) { int updays, uphours, upminutes; diff --git a/runit/chpst.c b/runit/chpst.c index 4662a4a..053051d 100644 --- a/runit/chpst.c +++ b/runit/chpst.c @@ -255,6 +255,7 @@ static void envuidgid(int, char **); static void envdir(int, char **); static void softlimit(int, char **); +int chpst_main(int argc, char **argv); int chpst_main(int argc, char **argv) { if (applet_name[3] == 'd') envdir(argc, argv); diff --git a/runit/runsv.c b/runit/runsv.c index 03187a8..246c502 100644 --- a/runit/runsv.c +++ b/runit/runsv.c @@ -390,6 +390,7 @@ static int ctrl(struct svdir *s, char c) return 1; } +int runsv_main(int argc, char **argv); int runsv_main(int argc, char **argv) { struct stat s; diff --git a/runit/runsvdir.c b/runit/runsvdir.c index 7e1dd6c..d9053ad 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c @@ -174,6 +174,7 @@ static int setup_log(void) return 1; } +int runsvdir_main(int argc, char **argv); int runsvdir_main(int argc, char **argv) { struct stat s; @@ -251,6 +251,7 @@ static int control(const char *a) return 1; } +int sv_main(int argc, char **argv); int sv_main(int argc, char **argv) { unsigned opt; diff --git a/runit/svlogd.c b/runit/svlogd.c index 0f17eec..e454bac 100644 --- a/runit/svlogd.c +++ b/runit/svlogd.c @@ -746,6 +746,7 @@ static void logmatch(struct logdir *ld) } } +int svlogd_main(int argc, char **argv); int svlogd_main(int argc, char **argv) { sigset_t ss; diff --git a/shell/ash.c b/shell/ash.c index 0f9b328..bfaf04f 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -7900,8 +7900,8 @@ static void read_profile(const char *); * is used to figure out how far we had gotten. */ -int -ash_main(int argc, char **argv) +int ash_main(int argc, char **argv); +int ash_main(int argc, char **argv) { char *shinit; volatile int state; diff --git a/shell/bbsh.c b/shell/bbsh.c index 7978fdc..fe27f44 100644 --- a/shell/bbsh.c +++ b/shell/bbsh.c @@ -198,6 +198,7 @@ static void handle(char *command) } } +int bbsh_main(int argc, char *argv[]); int bbsh_main(int argc, char *argv[]) { char *command=NULL; diff --git a/shell/hush.c b/shell/hush.c index c3640ed..5737240 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -2686,6 +2686,7 @@ static void setup_job_control(void) tcsetpgrp(shell_terminal, shell_pgrp); } +int hush_main(int argc, char **argv); int hush_main(int argc, char **argv) { int opt; diff --git a/shell/lash.c b/shell/lash.c index 51ad3cc..502e0d8 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -1502,6 +1502,7 @@ static inline void setup_job_control(void) } #endif +int lash_main(int argc_l, char **argv_l); int lash_main(int argc_l, char **argv_l) { unsigned opt; diff --git a/shell/msh.c b/shell/msh.c index 4964351..817b840 100644 --- a/shell/msh.c +++ b/shell/msh.c @@ -5097,6 +5097,7 @@ static void freehere(int area) * shell */ +int msh_main(int argc, char **argv); int msh_main(int argc, char **argv) { int f; diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index d916878..47c2c72 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c @@ -34,6 +34,7 @@ static void klogd_signal(int sig ATTRIBUTE_UNUSED) #define KLOGD_LOGBUF_SIZE 4096 +int klogd_main(int argc, char **argv); int klogd_main(int argc, char **argv) { RESERVE_CONFIG_BUFFER(log_buffer, KLOGD_LOGBUF_SIZE); diff --git a/sysklogd/logger.c b/sysklogd/logger.c index 8aaf522..71dd531 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c @@ -81,6 +81,7 @@ static int pencode(char *s) } +int logger_main(int argc, char **argv); int logger_main(int argc, char **argv) { char *str_p, *str_t; diff --git a/sysklogd/logread.c b/sysklogd/logread.c index d092056..b1758a6 100644 --- a/sysklogd/logread.c +++ b/sysklogd/logread.c @@ -54,6 +54,7 @@ static void interrupted(int sig ATTRIBUTE_UNUSED) exit(0); } +int logread_main(int argc, char **argv); int logread_main(int argc, char **argv) { int cur; diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index bfa9a44..86bfdc5 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -542,6 +542,7 @@ static void do_syslogd(void) } /* for */ } +int syslogd_main(int argc, char **argv); int syslogd_main(int argc, char **argv) { char OPTION_DECL; diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index 658cddc..0bbc306 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c @@ -13,6 +13,7 @@ #include <unistd.h> #include <sys/klog.h> +int dmesg_main(int argc, char *argv[]); int dmesg_main(int argc, char *argv[]) { char *size, *level; diff --git a/util-linux/fbset.c b/util-linux/fbset.c index 94d04b1..bd584e4 100644 --- a/util-linux/fbset.c +++ b/util-linux/fbset.c @@ -309,6 +309,7 @@ static inline void showmode(struct fb_var_screeninfo *v) #ifdef STANDALONE int main(int argc, char **argv) #else +int fbset_main(int argc, char **argv); int fbset_main(int argc, char **argv) #endif { diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c index 0242d8d..d694bd6 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) } } +int fdformat_main(int argc,char **argv); int fdformat_main(int argc,char **argv) { int fd, n, cyl, read_bytes, verify; diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index 6d82710..66acb08 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c @@ -2784,6 +2784,7 @@ unknown_command(int c) } #endif +int fdisk_main(int argc, char **argv); int fdisk_main(int argc, char **argv) { char *str_b, *str_C, *str_H, *str_S; diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c index 2293d3e..ae341b0 100644 --- a/util-linux/freeramdisk.c +++ b/util-linux/freeramdisk.c @@ -14,6 +14,7 @@ /* From <linux/fd.h> */ #define FDFLUSH _IO(2,0x4b) +int freeramdisk_main(int argc, char **argv); int freeramdisk_main(int argc, char **argv) { int result; diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index 4e93651..049bda4 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c @@ -1207,6 +1207,7 @@ static void check2(void) void check2(void); #endif +int fsck_minix_main(int argc, char **argv); int fsck_minix_main(int argc, char **argv) { struct termios tmp; diff --git a/util-linux/getopt.c b/util-linux/getopt.c index 64f568a..4861990 100644 --- a/util-linux/getopt.c +++ b/util-linux/getopt.c @@ -288,6 +288,7 @@ static const struct option longopts[]= static const char shortopts[]="+ao:l:n:qQs:Tu"; +int getopt_main(int argc, char *argv[]); int getopt_main(int argc, char *argv[]) { const char *optstr = NULL; diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c index 5cb245f..cddd185 100644 --- a/util-linux/hexdump.c +++ b/util-linux/hexdump.c @@ -51,6 +51,7 @@ static const struct suffix_mult suffixes[] = { {NULL, 0 } }; +int hexdump_main(int argc, char **argv); int hexdump_main(int argc, char **argv) { const char *p; diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index 8fcd8c9..ca4238f 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c @@ -176,6 +176,7 @@ static int check_utc(void) #define HWCLOCK_OPT_HCTOSYS 0x08 #define HWCLOCK_OPT_SYSTOHC 0x10 +int hwclock_main(int argc, char **argv ); int hwclock_main(int argc, char **argv ) { unsigned opt; diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c index 886c2ef..9240e2c 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) #endif /* #ifndef CONFIG_IPCRM_DROP_LEGACY */ +int ipcrm_main(int argc, char **argv); int ipcrm_main(int argc, char **argv) { int c; diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c index b81d07d..5a7b224 100644 --- a/util-linux/ipcs.c +++ b/util-linux/ipcs.c @@ -568,6 +568,7 @@ static void print_sem(int semid) puts(""); } +int ipcs_main(int argc, char **argv); int ipcs_main(int argc, char **argv) { int id = 0; diff --git a/util-linux/losetup.c b/util-linux/losetup.c index c7eb85a..b220c98 100644 --- a/util-linux/losetup.c +++ b/util-linux/losetup.c @@ -12,6 +12,7 @@ #include "busybox.h" +int losetup_main(int argc, char **argv); int losetup_main(int argc, char **argv) { unsigned opt; diff --git a/util-linux/mdev.c b/util-linux/mdev.c index 4a0e9f9..f9f067d 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c @@ -230,6 +230,7 @@ static void find_dev(char *path) closedir(dir); } +int mdev_main(int argc, char *argv[]); int mdev_main(int argc, char *argv[]) { char *action; diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index e66ef7e..7257ddb 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c @@ -587,6 +587,7 @@ static void get_list_blocks(char *filename) printf("%d bad block(s)\n", badblocks); } +int mkfs_minix_main(int argc, char **argv); int mkfs_minix_main(int argc, char **argv) { struct mntent *mp; diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c index 7baa3ec..ac894d5 100644 --- a/util-linux/mkswap.c +++ b/util-linux/mkswap.c @@ -8,6 +8,7 @@ #include "busybox.h" +int mkswap_main(int argc, char *argv[]); int mkswap_main(int argc, char *argv[]) { int fd, pagesize; diff --git a/util-linux/more.c b/util-linux/more.c index d048ace..d00cb40 100644 --- a/util-linux/more.c +++ b/util-linux/more.c @@ -38,6 +38,7 @@ static void gotsig(int sig) #endif /* FEATURE_USE_TERMIOS */ +int more_main(int argc, char **argv); int more_main(int argc, char **argv) { int c, lines, input = 0; diff --git a/util-linux/mount.c b/util-linux/mount.c index ba98519..702c033 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -1524,6 +1524,7 @@ report_error: const char must_be_root[] = "you must be root"; +int mount_main(int argc, char **argv); int mount_main(int argc, char **argv) { enum { OPT_ALL = 0x10 }; diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c index bd02302..97c7fa8 100644 --- a/util-linux/pivot_root.c +++ b/util-linux/pivot_root.c @@ -12,6 +12,7 @@ extern int pivot_root(const char * new_root,const char * put_old); +int pivot_root_main(int argc, char **argv); int pivot_root_main(int argc, char **argv) { if (argc != 3) diff --git a/util-linux/rdate.c b/util-linux/rdate.c index d6d1384..33cf64e 100644 --- a/util-linux/rdate.c +++ b/util-linux/rdate.c @@ -42,6 +42,7 @@ static time_t askremotedate(const char *host) return ntohl(nett) - RFC_868_BIAS; } +int rdate_main(int argc, char **argv); int rdate_main(int argc, char **argv) { time_t remote_time; diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c index dd810f0..a17b9c8 100644 --- a/util-linux/readprofile.c +++ b/util-linux/readprofile.c @@ -41,6 +41,7 @@ static const char defaultmap[] = "/boot/System.map"; static const char defaultpro[] = "/proc/profile"; +int readprofile_main(int argc, char **argv); int readprofile_main(int argc, char **argv) { FILE *map; diff --git a/util-linux/setarch.c b/util-linux/setarch.c index d7e1c09..8f4e308 100644 --- a/util-linux/setarch.c +++ b/util-linux/setarch.c @@ -16,6 +16,7 @@ #include "busybox.h" +int setarch_main(int ATTRIBUTE_UNUSED argc, char **argv); int setarch_main(int ATTRIBUTE_UNUSED argc, char **argv) { int pers = -1; diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 8434d12..e1de4eb 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c @@ -59,6 +59,7 @@ static int do_em_all(void) #define DO_ALL 0x01 +int swap_on_off_main(int argc, char **argv); int swap_on_off_main(int argc, char **argv) { int ret; diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index 007083b..5a01fd6 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c @@ -63,6 +63,7 @@ static void delete_contents(const char *directory) } else unlink(directory); } +int switch_root_main(int argc, char *argv[]); int switch_root_main(int argc, char *argv[]) { char *newroot, *console=NULL; diff --git a/util-linux/umount.c b/util-linux/umount.c index 6ba72ae..4ea15d9 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c @@ -20,6 +20,7 @@ #define OPT_REMOUNT 16 #define OPT_ALL (ENABLE_FEATURE_UMOUNT_ALL ? 32 : 0) +int umount_main(int argc, char **argv); int umount_main(int argc, char **argv) { int doForce; |