From 06af2165288cd6516b89001ec9e24992619230e0 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 3 Feb 2007 17:28:39 +0000 Subject: [PATCH] suppress warnings about easch _main() having no preceding prototype --- applets/Kbuild | 2 +- applets/busybox.c | 1 + archival/ar.c | 1 + archival/bunzip2.c | 1 + archival/cpio.c | 1 + archival/dpkg.c | 1 + archival/dpkg_deb.c | 1 + archival/gunzip.c | 1 + archival/gzip.c | 1 + archival/rpm.c | 1 + archival/rpm2cpio.c | 1 + archival/tar.c | 1 + archival/uncompress.c | 1 + archival/unlzma.c | 1 + archival/unzip.c | 1 + console-tools/chvt.c | 1 + console-tools/clear.c | 1 + console-tools/deallocvt.c | 1 + console-tools/dumpkmap.c | 7 ++++--- console-tools/loadfont.c | 1 + console-tools/loadkmap.c | 1 + console-tools/openvt.c | 1 + console-tools/reset.c | 1 + console-tools/resize.c | 1 + console-tools/setconsole.c | 1 + console-tools/setkeycodes.c | 7 ++----- coreutils/basename.c | 1 + coreutils/cal.c | 1 + coreutils/cat.c | 1 + coreutils/catv.c | 1 + coreutils/chgrp.c | 1 + coreutils/chmod.c | 1 + coreutils/chown.c | 1 + coreutils/chroot.c | 1 + coreutils/cksum.c | 1 + coreutils/cmp.c | 1 + coreutils/comm.c | 1 + coreutils/cp.c | 1 + coreutils/cut.c | 1 + coreutils/date.c | 1 + coreutils/dd.c | 1 + coreutils/df.c | 1 + coreutils/diff.c | 1 + coreutils/dirname.c | 1 + coreutils/dos2unix.c | 1 + coreutils/du.c | 1 + coreutils/echo.c | 1 + coreutils/env.c | 1 + coreutils/expr.c | 1 + coreutils/false.c | 1 + coreutils/fold.c | 1 + coreutils/head.c | 1 + coreutils/hostid.c | 1 + coreutils/id.c | 1 + coreutils/install.c | 1 + coreutils/length.c | 1 + coreutils/ln.c | 1 + coreutils/logname.c | 1 + coreutils/ls.c | 1 + coreutils/md5_sha1_sum.c | 1 + coreutils/mkdir.c | 1 + coreutils/mkfifo.c | 1 + coreutils/mknod.c | 1 + coreutils/mv.c | 1 + coreutils/nice.c | 1 + coreutils/nohup.c | 1 + coreutils/od.c | 1 + coreutils/od_bloaty.c | 4 ++-- coreutils/printenv.c | 1 + coreutils/printf.c | 1 + coreutils/pwd.c | 1 + coreutils/realpath.c | 1 + coreutils/rm.c | 1 + coreutils/rmdir.c | 1 + coreutils/seq.c | 1 + coreutils/sleep.c | 1 + coreutils/sort.c | 1 + coreutils/stat.c | 1 + coreutils/stty.c | 1 + coreutils/sum.c | 1 + coreutils/sync.c | 1 + coreutils/tail.c | 1 + coreutils/tee.c | 1 + coreutils/test.c | 1 + coreutils/touch.c | 1 + coreutils/tr.c | 1 + coreutils/true.c | 1 + coreutils/tty.c | 1 + coreutils/uname.c | 1 + coreutils/uniq.c | 1 + coreutils/usleep.c | 1 + coreutils/uudecode.c | 1 + coreutils/uuencode.c | 1 + coreutils/watch.c | 1 + coreutils/wc.c | 1 + coreutils/who.c | 1 + coreutils/whoami.c | 1 + coreutils/yes.c | 1 + debianutils/mktemp.c | 1 + debianutils/pipe_progress.c | 1 + debianutils/readlink.c | 1 + debianutils/run_parts.c | 1 + debianutils/start_stop_daemon.c | 1 + debianutils/which.c | 1 + docs/new-applet-HOWTO.txt | 1 + e2fsprogs/chattr.c | 1 + e2fsprogs/fsck.c | 1 + e2fsprogs/lsattr.c | 1 + e2fsprogs/old_e2fsprogs/chattr.c | 1 + e2fsprogs/old_e2fsprogs/e2fsck.c | 1 + e2fsprogs/old_e2fsprogs/fsck.c | 1 + e2fsprogs/old_e2fsprogs/lsattr.c | 1 + e2fsprogs/old_e2fsprogs/mke2fs.c | 1 + e2fsprogs/old_e2fsprogs/tune2fs.c | 1 + editors/awk.c | 1 + editors/ed.c | 1 + editors/patch.c | 1 + editors/sed.c | 1 + editors/vi.c | 1 + findutils/find.c | 1 + findutils/grep.c | 1 + findutils/xargs.c | 1 + include/libbb.h | 11 +++++++---- init/halt.c | 1 + init/init.c | 1 + init/mesg.c | 1 + libbb/get_console.c | 4 ++-- loginutils/addgroup.c | 1 + loginutils/adduser.c | 1 + loginutils/deluser.c | 1 + loginutils/getty.c | 1 + loginutils/login.c | 1 + loginutils/passwd.c | 1 + loginutils/su.c | 1 + loginutils/sulogin.c | 1 + loginutils/vlock.c | 1 + miscutils/adjtimex.c | 1 + miscutils/bbconfig.c | 1 + miscutils/crond.c | 1 + miscutils/crontab.c | 1 + miscutils/dc.c | 1 + miscutils/devfsd.c | 1 + miscutils/eject.c | 1 + miscutils/hdparm.c | 2 ++ miscutils/last.c | 1 + miscutils/less.c | 1 + miscutils/makedevs.c | 2 ++ miscutils/mountpoint.c | 1 + miscutils/mt.c | 1 + miscutils/nmeter.c | 1 + miscutils/raidautorun.c | 1 + miscutils/readahead.c | 1 + miscutils/runlevel.c | 1 + miscutils/rx.c | 1 + miscutils/setsid.c | 1 + miscutils/strings.c | 1 + miscutils/taskset.c | 1 + miscutils/time.c | 1 + miscutils/watchdog.c | 1 + modutils/insmod.c | 2 ++ modutils/lsmod.c | 2 ++ modutils/modprobe.c | 1 + modutils/rmmod.c | 1 + networking/arp.c | 1 + networking/arping.c | 1 + networking/dnsd.c | 1 + networking/ether-wake.c | 1 + networking/ftpgetput.c | 1 + networking/hostname.c | 1 + networking/httpd.c | 1 + networking/ifconfig.c | 1 + networking/ifupdown.c | 1 + networking/inetd.c | 4 ++-- networking/ip.c | 1 + networking/ipaddr.c | 1 + networking/ipcalc.c | 1 + networking/iplink.c | 1 + networking/iproute.c | 1 + networking/iprule.c | 1 + networking/iptunnel.c | 1 + networking/isrv_identd.c | 1 + networking/nameif.c | 1 + networking/nc.c | 1 + networking/netstat.c | 1 + networking/nslookup.c | 1 + networking/ping.c | 3 +++ networking/route.c | 1 + networking/telnet.c | 1 + networking/telnetd.c | 4 ++-- networking/tftp.c | 1 + networking/traceroute.c | 4 ++-- networking/udhcp/dhcpc.c | 1 + networking/udhcp/dhcpd.c | 1 + networking/udhcp/dhcprelay.c | 1 + networking/udhcp/dumpleases.c | 1 + networking/vconfig.c | 1 + networking/wget.c | 1 + networking/zcip.c | 1 + procps/free.c | 1 + procps/fuser.c | 1 + procps/kill.c | 1 + procps/pidof.c | 1 + procps/ps.c | 2 ++ procps/renice.c | 1 + procps/sysctl.c | 1 + procps/top.c | 1 + procps/uptime.c | 1 + runit/chpst.c | 1 + runit/runsv.c | 1 + runit/runsvdir.c | 1 + runit/sv.c | 1 + runit/svlogd.c | 1 + shell/ash.c | 4 ++-- shell/bbsh.c | 1 + shell/hush.c | 1 + shell/lash.c | 1 + shell/msh.c | 1 + sysklogd/klogd.c | 1 + sysklogd/logger.c | 1 + sysklogd/logread.c | 1 + sysklogd/syslogd.c | 1 + util-linux/dmesg.c | 1 + util-linux/fbset.c | 1 + util-linux/fdformat.c | 1 + util-linux/fdisk.c | 1 + util-linux/freeramdisk.c | 1 + util-linux/fsck_minix.c | 1 + util-linux/getopt.c | 1 + util-linux/hexdump.c | 1 + util-linux/hwclock.c | 1 + util-linux/ipcrm.c | 1 + util-linux/ipcs.c | 1 + util-linux/losetup.c | 1 + util-linux/mdev.c | 1 + util-linux/mkfs_minix.c | 1 + util-linux/mkswap.c | 1 + util-linux/more.c | 1 + util-linux/mount.c | 1 + util-linux/pivot_root.c | 1 + util-linux/rdate.c | 1 + util-linux/readprofile.c | 1 + util-linux/setarch.c | 1 + util-linux/swaponoff.c | 1 + util-linux/switch_root.c | 1 + util-linux/umount.c | 1 + 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 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 79634f99e..99af9ca02 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 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) #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 a6cd17611..1deac7b53 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 73651ba10..011386782 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 126138f80..5c69d9c64 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 c9b8a0429..fde3c3382 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 c5deec3ce..3d99fe506 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 2b520b3e7..48d1652bc 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 deb87c180..9ab12df2d 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 3442046c4..7a2e64b86 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 6c15f65c9..8bb845942 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 461179016..b16c353ec 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 20c4ff2a7..24632c4a7 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 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) 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 bbc5a9c31..50908115c 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 9686d5004..8e34d6d9a 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 cd581b1c8..81ea68ebb 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c @@ -15,6 +15,7 @@ /* From */ 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 7c6633ae8..0c1914830 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 6aa739ba4..f691b11af 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 74a2378b4..a141435e2 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 c7b3e4fa4..9296219bd 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 26aab667b..03b078c5d 100644 --- a/console-tools/reset.c +++ b/console-tools/reset.c @@ -15,6 +15,7 @@ #include #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 c405629aa..2fe5526fb 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 ef81f298b..6621d25f8 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 d82525786..ff137d562 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 -#include -#include #include #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 30f76dc12..46f7122c8 100644 --- a/coreutils/basename.c +++ b/coreutils/basename.c @@ -25,6 +25,7 @@ #include #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 82ebf143a..3d617916e 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 7a34891e8..7bab325ef 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 66f30693a..826e0e9a6 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 465ea0ccf..eaa29cbc6 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 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 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 09cf73f04..dad5ce063 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 62cfdc244..16c743fef 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 52213328c..66a255c4e 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 71007eac1..0aebd4b4d 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 91f017753..b6412968d 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 47ad85ecf..7b0de477b 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 a72b2c29a..22014fcfb 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 034a18b98..dfc8b2f40 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 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, #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 3b3292590..484cabb37 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 c846e2b69..31c20f052 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 e986a9701..4ecde3147 100644 --- a/coreutils/dirname.c +++ b/coreutils/dirname.c @@ -14,6 +14,7 @@ #include #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 1ed8771c0..62c1361b2 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 a4b3c817e..eceb646d1 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 0c8eac3bc..8270fc006 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 e4cad271b..04279f3e0 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 469d467bf..62d1f3a8f 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 084bc0c1e..2a26e0e28 100644 --- a/coreutils/false.c +++ b/coreutils/false.c @@ -13,6 +13,7 @@ #include #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 490882f6d..4ce52cf0b 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 59b4d552c..ed1d01d52 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 65447aa63..51a76c631 100644 --- a/coreutils/hostid.c +++ b/coreutils/hostid.c @@ -13,6 +13,7 @@ #include #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 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) 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 c899158aa..dd73fb693 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 6413be007..1dc122cc1 100644 --- a/coreutils/length.c +++ b/coreutils/length.c @@ -7,6 +7,7 @@ #include #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 a307e5579..720713475 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 695a736c6..743e2291c 100644 --- a/coreutils/logname.c +++ b/coreutils/logname.c @@ -25,6 +25,7 @@ #include #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 067e463ee..798bc8201 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 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) 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 2cc9c7a4c..67819e784 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 24d27e7c0..6d8aa413e 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 8ca511cd5..6fa6d8353 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 353124b35..7d4905fc9 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 293861842..b7bff6a52 100644 --- a/coreutils/nice.c +++ b/coreutils/nice.c @@ -10,6 +10,7 @@ #include #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 317d2a8ae..a9944b7f4 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 ab92dacbb..0de9def5a 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 fae41afae..f060c0ace 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 ec50f7151..1d41eeb7b 100644 --- a/coreutils/printenv.c +++ b/coreutils/printenv.c @@ -13,6 +13,7 @@ #include #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 924499b29..0180d0e5a 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 bd36d627e..b4599b4f3 100644 --- a/coreutils/pwd.c +++ b/coreutils/pwd.c @@ -11,6 +11,7 @@ #include #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 7fac471eb..b3f7e4957 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 5df7d5f65..1883feed8 100644 --- a/coreutils/rm.c +++ b/coreutils/rm.c @@ -18,6 +18,7 @@ #include #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 c61bae795..8cbd6f1fa 100644 --- a/coreutils/rmdir.c +++ b/coreutils/rmdir.c @@ -15,6 +15,7 @@ #include #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 f2b4706f2..e81a4660a 100644 --- a/coreutils/seq.c +++ b/coreutils/seq.c @@ -11,6 +11,7 @@ #include #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 e32e2157d..b89b0fe9c 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 29cadf5f6..e2c7b1dbf 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 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) 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 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, #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 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) #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 59f0b504a..536c57a17 100644 --- a/coreutils/sync.c +++ b/coreutils/sync.c @@ -13,6 +13,7 @@ #include #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 2a1645309..52bacb7ed 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 248fd1445..338232ce9 100644 --- a/coreutils/tee.c +++ b/coreutils/tee.c @@ -13,6 +13,7 @@ #include "busybox.h" #include +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 d3d760467..6e0d5d38e 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 72bf904f8..ae4e689f1 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c @@ -26,6 +26,7 @@ #include #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 237ade047..cea3b05b6 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 388e897c0..b2f3a9bad 100644 --- a/coreutils/true.c +++ b/coreutils/true.c @@ -13,6 +13,7 @@ #include #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 fee4b8b9f..c28aa33d7 100644 --- a/coreutils/tty.c +++ b/coreutils/tty.c @@ -15,6 +15,7 @@ #include #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 5a3eafe92..2faa89321 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 100f2be00..0cc0c83b3 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 de473a7b2..7dd914638 100644 --- a/coreutils/usleep.c +++ b/coreutils/usleep.c @@ -14,6 +14,7 @@ #include #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 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) } } +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 e8f8d541c..3207d7296 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 81856c867..60a4a71ce 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 d89cb45f6..926b3ac19 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 4cd42652b..25d35fad9 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 df714f22c..3185817b6 100644 --- a/coreutils/whoami.c +++ b/coreutils/whoami.c @@ -14,6 +14,7 @@ #include #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 fc6e611e6..2611c3e82 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 d47d5a0bf..ce5bda515 100644 --- a/debianutils/mktemp.c +++ b/debianutils/mktemp.c @@ -16,6 +16,7 @@ #include #include +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 75d26e20f..51a017c98 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 400259080..8f9cfe431 100644 --- a/debianutils/readlink.c +++ b/debianutils/readlink.c @@ -13,6 +13,7 @@ #include #include +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 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) /* 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 9a865f6c6..eb2427a50 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 79b2a4f83..02992d0f6 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 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: #include "busybox.h" #include +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 f46646d71..1b7942e1f 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 8cbfc89fb..9ec31d2a3 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 f317b047e..8945b53e0 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 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, 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 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) 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 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[]) 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 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, 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 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) 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 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) 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 ae7ca23d4..9af6ecc5b 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 5a48fbe75..42adca409 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 f8d7605c0..2c908040f 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 1572c74ba..b8f00c0c9 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 46181cf60..45a80517d 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 d71af9ca9..b4ef7cbaa 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 76f656237..f4652fa72 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 077b8847f..c2060f804 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 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); /* 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 a6cf48bbe..d5c22a8ac 100644 --- a/init/halt.c +++ b/init/halt.c @@ -10,6 +10,7 @@ #include "busybox.h" #include +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 dc8752447..ce1f7391a 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 658c82447..40d8ae3ca 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 52ae3d215..62a17399d 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 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) * * 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 5a48e9cbb..8193aea82 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 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) } } +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 8f81cafcc..64d2d08c2 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 94bb0ddcb..a19191b8c 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 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, } +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 9a134dd88..0a786cbfb 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 8bcb393f5..8e3095c87 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 7cc812fbb..06a7169d9 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 b35538a84..985ee2d0c 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 ce14d4a1f..6896506e6 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 aace3ee18..d237a677e 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 eb7c2059c..02df85be8 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 7b6405754..2121f7669 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 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) /* 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 8e37c84b5..5d7ef1c28 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 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" /*-------------------------------------*/ /* 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 fd1033bf7..d354807e5 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 20da02208..9aae81fa4 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 5602c2248..aa000a7ab 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 b1bcab698..e380154ee 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 a4b527f1b..bed2969ca 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 966131af5..efc78d767 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 e5bce9a92..c95b00aae 100644 --- a/miscutils/raidautorun.c +++ b/miscutils/raidautorun.c @@ -13,6 +13,7 @@ #include #include +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 356c40451..601e845bc 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 91d49fa55..23714f7c7 100644 --- a/miscutils/runlevel.c +++ b/miscutils/runlevel.c @@ -18,6 +18,7 @@ #include #include +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 6fb23b97b..29848b1d9 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 47c44d2cc..b4d5ced46 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 691502dab..49f2cf31e 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 28be31a31..cf6a8be99 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 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) 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 e342c13f3..9dbefb985 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 edbdfab0e..57092f79a 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 af16f2c61..31549b919 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 94f7b22c2..d5b5dd41b 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 22e864d57..0a67b8965 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 33191d89b..2af6bc970 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 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) 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 6a866f1d7..6d1335e67 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 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); 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 590b7ebcd..dad1c9947 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 45aaaa465..3f6a658d6 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 e3f798c4c..fb363c56f 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 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); * 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 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) 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 5e7005e9b..c037d114a 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 7a7f55c46..fdd848049 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 c90780879..fb0213702 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 685f0e315..63ce99ffe 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 4a28c74a9..54087e927 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 62335a8b3..3d540b2ba 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 43eaea633..9c1fb50de 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 9ae734a21..8a65413b6 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 2d4399cea..f9ab0b2c0 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 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) 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 dc9102b2a..c1e881162 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 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 * 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 914f3f5ee..14c05b3e6 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 ba4f585db..d0e6f3ad1 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 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 */ "\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 7407fa413..2a6457f2c 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 25cba3eb0..ef9b1ac74 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 eb192d8fc..a6d85a5c4 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 25c6569bb..4ddde2fda 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 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) } +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 7d0b8fad1..90d8f0d17 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 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 } } +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 a0e81bb13..ce73c474c 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 003c1a8f7..06c06cb5e 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 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) } #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 b56870652..e3755a932 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 84432e0d1..860f57347 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 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) 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 5b167326f..9a6e93665 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 1d9718945..ea2520a4f 100644 --- a/procps/pidof.c +++ b/procps/pidof.c @@ -16,6 +16,7 @@ enum { OPT_OMIT = USE_FEATURE_PIDOF_OMIT( (1< #include +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 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) #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 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) } } +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 6d827105e..66acb088f 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 2293d3ee6..ae341b066 100644 --- a/util-linux/freeramdisk.c +++ b/util-linux/freeramdisk.c @@ -14,6 +14,7 @@ /* From */ #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 4e9365116..049bda4cc 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 64f568aa9..4861990dd 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 5cb245feb..cddd185e2 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 8fcd8c99c..ca4238f9e 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 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) #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 b81d07d6d..5a7b22434 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 c7eb85a91..b220c9878 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 4a0e9f9fd..f9f067dfe 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 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) 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 7baa3ecfb..ac894d50a 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 d048ace92..d00cb40b8 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 ba98519b6..702c0338a 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 bd02302c7..97c7fa85e 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 d6d1384f7..33cf64efb 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 dd810f021..a17b9c880 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 d7e1c0917..8f4e308d4 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 8434d121c..e1de4eb0c 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 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) } 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 6ba72aed1..4ea15d91b 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; -- 2.25.1