CFLAGS += $(call cc-option,-g)
endif
+ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y)
# on i386: 14% smaller libbusybox.so
# (code itself is 9% bigger, we save on relocs/PLT/GOT)
-ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y)
CFLAGS += -fpic
+# and another 4% reduction of libbusybox.so:
+# (external entry points must be marked EXTERNALLY_VISIBLE)
+CFLAGS += $(call cc-option,-fvisibility=hidden)
endif
ifeq ($(CONFIG_STATIC),y)
#if ENABLE_BUILD_LIBBUSYBOX
int main(int argc, char **argv)
{
- return libbusybox_main(argc, argv);
+ return lbb_main(argc, argv);
}
#endif
#define AR_OPT_CREATE 0x20
#define AR_OPT_INSERT 0x40
-int ar_main(int argc, char **argv);
+int ar_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ar_main(int argc, char **argv)
{
static const char msg_unsupported_err[] ALIGN1 =
return unpack_bz2_stream(STDIN_FILENO, STDOUT_FILENO);
}
-int bunzip2_main(int argc, char **argv);
+int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int bunzip2_main(int argc, char **argv)
{
getopt32(argv, "cf");
return status;
}
-int gunzip_main(int argc, char **argv);
+int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int gunzip_main(int argc, char **argv)
{
getopt32(argv, "cfvdt");
return unpack_lzma_stream(STDIN_FILENO, STDOUT_FILENO);
}
-int unlzma_main(int argc, char **argv);
+int unlzma_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int unlzma_main(int argc, char **argv)
{
getopt32(argv, "cf");
return status;
}
-int uncompress_main(int argc, char **argv);
+int uncompress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uncompress_main(int argc, char **argv)
{
getopt32(argv, "cf");
#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) MAIN_EXTERNALLY_VISIBLE;
int cpio_main(int argc, char **argv)
{
archive_handle_t *archive_handle;
set_status(status_num, "installed", 3);
}
-int dpkg_main(int argc, char **argv);
+int dpkg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dpkg_main(int argc, char **argv)
{
deb_file_t **deb_file = NULL;
#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) MAIN_EXTERNALLY_VISIBLE;
int dpkg_deb_main(int argc, char **argv)
{
archive_handle_t *ar_archive;
return 0;
}
-int gzip_main(int argc, char **argv);
+int gzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int gzip_main(int argc, char **argv)
{
unsigned opt;
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) MAIN_EXTERNALLY_VISIBLE;
int rpm_main(int argc, char **argv)
{
int opt = 0, func = 0, rpm_fd, offset;
}
/* No getopt required */
-int rpm2cpio_main(int argc, char **argv);
+int rpm2cpio_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int rpm2cpio_main(int argc, char **argv)
{
struct rpm_lead lead;
;
#endif
-int tar_main(int argc, char **argv);
+int tar_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tar_main(int argc, char **argv)
{
char (*get_header_ptr)(archive_handle_t *) = get_header_tar;
return 0;
}
-int unzip_main(int argc, char **argv);
+int unzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int unzip_main(int argc, char **argv)
{
zip_header_t zip_header;
VT_WAITACTIVE = 0x5607 /* wait for vt active */
};
-int chvt_main(int argc, char **argv);
+int chvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chvt_main(int argc, char **argv)
{
int fd, num;
#include "libbb.h"
-int clear_main(int argc, char **argv);
+int clear_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int clear_main(int argc, char **argv)
{
return printf("\033[H\033[J") != 6;
/* 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) MAIN_EXTERNALLY_VISIBLE;
int deallocvt_main(int argc, char **argv)
{
/* num = 0 deallocate all unused consoles */
#define NR_KEYS 128
#define MAX_NR_KEYMAPS 256
-int dumpkmap_main(int argc, char **argv);
+int dumpkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dumpkmap_main(int argc, char **argv)
{
struct kbentry ke;
do_loadfont(fd, inbuf + offset, unit, 256);
}
-int loadfont_main(int argc, char **argv);
+int loadfont_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int loadfont_main(int argc, char **argv)
{
int fd;
#define NR_KEYS 128
#define MAX_NR_KEYMAPS 256
-int loadkmap_main(int argc, char **argv);
+int loadkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int loadkmap_main(int argc, char **argv)
{
struct kbentry ke;
#include "libbb.h"
-int openvt_main(int argc, char **argv);
+int openvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int openvt_main(int argc, char **argv)
{
char vtname[sizeof(VC_FORMAT) + 2];
#include "libbb.h"
-int reset_main(int argc, char **argv);
+int reset_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int reset_main(int argc, char **argv)
{
if (isatty(1)) {
exit(1);
}
-int resize_main(int argc, char **argv);
+int resize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int resize_main(int argc, char **argv)
{
struct termios new;
#define OPT_SETCONS_RESET 1
-int setconsole_main(int argc, char **argv);
+int setconsole_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int setconsole_main(int argc, char **argv)
{
unsigned long flags;
KDSETKEYCODE = 0x4B4D /* write kernel keycode table entry */
};
-int setkeycodes_main(int argc, char** argv);
-int setkeycodes_main(int argc, char** argv)
+int setkeycodes_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int setkeycodes_main(int argc, char **argv)
{
int fd, sc;
struct kbkeycode a;
#include "libbb.h"
-int setlogcons_main(int argc, char **argv);
+int setlogcons_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int setlogcons_main(int argc, char **argv)
{
struct {
/* This is a NOFORK applet. Be very careful! */
-int basename_main(int argc, char **argv);
+int basename_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int basename_main(int argc, char **argv)
{
size_t m, n;
#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) MAIN_EXTERNALLY_VISIBLE;
int cal_main(int argc, char **argv)
{
struct tm *local_time;
return retval;
}
-int cat_main(int argc, char **argv);
+int cat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cat_main(int argc, char **argv)
{
getopt32(argv, "u");
#include "libbb.h"
-int catv_main(int argc, char **argv);
+int catv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int catv_main(int argc, char **argv)
{
int retval = EXIT_SUCCESS;
/* This is a NOEXEC applet. Be very careful! */
-int chgrp_main(int argc, char **argv);
+int chgrp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chgrp_main(int argc, char **argv)
{
/* "chgrp [opts] abc file(s)" == "chown [opts] :abc file(s)" */
return FALSE;
}
-int chmod_main(int argc, char **argv);
+int chmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chmod_main(int argc, char **argv)
{
int retval = EXIT_SUCCESS;
return FALSE;
}
-int chown_main(int argc, char **argv);
+int chown_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chown_main(int argc, char **argv)
{
int retval = EXIT_SUCCESS;
#include "libbb.h"
-int chroot_main(int argc, char **argv);
+int chroot_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chroot_main(int argc, char **argv)
{
if (argc < 2) {
#include "libbb.h"
-int cksum_main(int argc, char **argv);
+int cksum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cksum_main(int argc, char **argv)
{
uint32_t *crc32_table = crc32_filltable(NULL, 1);
fputs(line, stdout);
}
-int comm_main(int argc, char **argv);
+int comm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int comm_main(int argc, char **argv)
{
#define LINE_LEN 100
/* This is a NOEXEC applet. Be very careful! */
-int cp_main(int argc, char **argv);
+int cp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cp_main(int argc, char **argv)
{
struct stat source_stat;
static const char _op_on_field[] ALIGN1 = " only when operating on fields";
-int cut_main(int argc, char **argv);
+int cut_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cut_main(int argc, char **argv)
{
char *sopt, *ltok;
putenv((char*)"TZ=UTC0");
}
-int date_main(int argc, char **argv);
+int date_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int date_main(int argc, char **argv)
{
time_t tm;
#define XATOU_SFX xatoul_sfx
#endif
-int dd_main(int argc, char **argv);
+int dd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dd_main(int argc, char **argv)
{
enum {
}
#endif
-int df_main(int argc, char **argv);
+int df_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int df_main(int argc, char **argv)
{
unsigned long blocks_used;
/* This is a NOFORK applet. Be very careful! */
-int dirname_main(int argc, char **argv);
+int dirname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dirname_main(int argc, char **argv)
{
if (argc != 2) {
return 0;
}
-int dos2unix_main(int argc, char **argv);
+int dos2unix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dos2unix_main(int argc, char **argv)
{
int o, conv_type;
return sum;
}
-int du_main(int argc, char **argv);
+int du_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int du_main(int argc, char **argv)
{
unsigned long total;
/* This is a NOFORK applet. Be very careful! */
-int echo_main(int argc, char** argv);
-int echo_main(int argc, char** argv)
+int echo_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int echo_main(int argc, char **argv)
{
return bb_echo(argv);
}
;
#endif
-int env_main(int argc, char** argv);
-int env_main(int argc, char** argv)
+int env_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int env_main(int argc, char **argv)
{
/* cleanenv was static - why? */
char *cleanenv[1];
}
#endif
-int expand_main(int argc, char **argv);
+int expand_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int expand_main(int argc, char **argv)
{
/* Default 8 spaces for 1 tab */
return l;
}
-int expr_main(int argc, char **argv);
+int expr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int expr_main(int argc, char **argv)
{
VALUE *v;
/* This is a NOFORK applet. Be very careful! */
-int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv);
+int false_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv)
{
return EXIT_FAILURE;
return column;
}
-int fold_main(int argc, char **argv);
+int fold_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int fold_main(int argc, char **argv)
{
char *line_out = NULL;
static const char header_fmt_str[] ALIGN1 = "\n==> %s <==\n";
-int head_main(int argc, char **argv);
+int head_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int head_main(int argc, char **argv)
{
unsigned long count = 10;
/* This is a NOFORK applet. Be very careful! */
-int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv);
+int hostid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv)
{
if (argc > 1) {
return status;
}
-int id_main(int argc, char **argv);
+int id_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int id_main(int argc, char **argv)
{
struct passwd *p;
#endif
-int install_main(int argc, char **argv);
+int install_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int install_main(int argc, char **argv)
{
struct stat statbuf;
/* This is a NOFORK applet. Be very careful! */
-int length_main(int argc, char **argv);
+int length_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int length_main(int argc, char **argv)
{
if ((argc != 2) || (**(++argv) == '-')) {
#define LN_BACKUP 8
#define LN_SUFFIX 16
-int ln_main(int argc, char **argv);
+int ln_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ln_main(int argc, char **argv)
{
int status = EXIT_SUCCESS;
/* This is a NOFORK applet. Be very careful! */
-int logname_main(int argc, char ATTRIBUTE_UNUSED **argv);
+int logname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int logname_main(int argc, char ATTRIBUTE_UNUSED **argv)
{
char buf[128];
/* THIS IS A "SAFE" APPLET, main() MAY BE CALLED INTERNALLY FROM SHELL */
/* BE CAREFUL! */
-int ls_main(int argc, char **argv);
+int ls_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ls_main(int argc, char **argv)
{
struct dnode **dnd;
return hash_value;
}
-int md5_sha1_sum_main(int argc, char **argv);
+int md5_sha1_sum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int md5_sha1_sum_main(int argc, char **argv)
{
int return_value = EXIT_SUCCESS;
;
#endif
-int mkdir_main(int argc, char **argv);
+int mkdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mkdir_main(int argc, char **argv)
{
mode_t mode = (mode_t)(-1);
#include "libbb.h"
#include "libcoreutils/coreutils.h"
-int mkfifo_main(int argc, char **argv);
+int mkfifo_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mkfifo_main(int argc, char **argv)
{
mode_t mode;
static const char modes_chars[] ALIGN1 = { '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) MAIN_EXTERNALLY_VISIBLE;
int mknod_main(int argc, char **argv)
{
mode_t mode;
static const char fmt[] ALIGN1 =
"cannot overwrite %sdirectory with %sdirectory";
-int mv_main(int argc, char **argv);
+int mv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mv_main(int argc, char **argv)
{
struct stat dest_stat;
#include <sys/resource.h>
#include "libbb.h"
-int nice_main(int argc, char **argv);
+int nice_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nice_main(int argc, char **argv)
{
int old_priority, adjustment;
#include "libbb.h"
-int nohup_main(int argc, char **argv);
+int nohup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nohup_main(int argc, char **argv)
{
int nullfd;
0xb, 1, 8, 9,
};
-int od_main(int argc, char **argv);
+int od_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int od_main(int argc, char **argv)
{
int ch;
check_and_close();
}
-int od_main(int argc, char **argv);
+int od_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int od_main(int argc, char **argv)
{
static const struct suffix_mult bkm[] = {
#include "libbb.h"
extern char **environ;
-int printenv_main(int argc, char **argv);
+int printenv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int printenv_main(int argc, char **argv)
{
/* no variables specified, show whole env */
return save_argc - argc;
}
-int printf_main(int argc, char **argv);
+int printf_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int printf_main(int argc, char **argv)
{
char *format;
/* This is a NOFORK applet. Be very careful! */
-int pwd_main(int argc, char **argv);
+int pwd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int pwd_main(int argc, char **argv)
{
char *buf;
#include "libbb.h"
-int readlink_main(int argc, char **argv);
+int readlink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int readlink_main(int argc, char **argv)
{
char *buf;
#include "libbb.h"
-int realpath_main(int argc, char **argv);
+int realpath_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int realpath_main(int argc, char **argv)
{
int retval = EXIT_SUCCESS;
/* This is a NOFORK applet. Be very careful! */
-int rm_main(int argc, char **argv);
+int rm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int rm_main(int argc, char **argv)
{
int status = 0;
/* This is a NOFORK applet. Be very careful! */
-int rmdir_main(int argc, char **argv);
+int rmdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int rmdir_main(int argc, char **argv)
{
int status = EXIT_SUCCESS;
/* This is a NOFORK applet. Be very careful! */
-int seq_main(int argc, char **argv);
+int seq_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int seq_main(int argc, char **argv)
{
double last, increment, i;
};
#endif
-int sleep_main(int argc, char **argv);
+int sleep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sleep_main(int argc, char **argv)
{
unsigned duration;
}
#endif
-int sort_main(int argc, char **argv);
+int sort_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sort_main(int argc, char **argv)
{
FILE *fp, *outfile = stdout;
#define SPLIT_OPT_b (1<<1)
#define SPLIT_OPT_a (1<<2)
-int split_main(int argc, char **argv);
+int split_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int split_main(int argc, char **argv)
{
unsigned suffix_len = 2;
return 1;
}
-int stat_main(int argc, char **argv);
+int stat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int stat_main(int argc, char **argv)
{
char *format = NULL;
#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) MAIN_EXTERNALLY_VISIBLE;
int stty_main(int argc, char **argv)
{
struct termios mode;
#undef buf
}
-int sum_main(int argc, char **argv);
+int sum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sum_main(int argc, char **argv)
{
unsigned n;
/* This is a NOFORK applet. Be very careful! */
-int sync_main(int argc, char **argv);
+int sync_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sync_main(int argc, char **argv)
{
bb_warn_ignoring_args(argc - 1);
return xatou_sfx(p, tail_suffixes);
}
-int tail_main(int argc, char **argv);
+int tail_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tail_main(int argc, char **argv)
{
unsigned count = 10;
#include "libbb.h"
#include <signal.h>
-int tee_main(int argc, char **argv);
+int tee_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tee_main(int argc, char **argv)
{
const char *mode = "w\0a";
/* This is a NOFORK applet. Be very careful! */
-int touch_main(int argc, char **argv);
+int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int touch_main(int argc, char **argv)
{
int fd;
return ix;
}
-int tr_main(int argc, char **argv);
+int tr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tr_main(int argc, char **argv)
{
unsigned char *ptr;
/* This is a NOFORK applet. Be very careful! */
-int true_main(int argc, char **argv);
+int true_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int true_main(int argc, char **argv)
{
return EXIT_SUCCESS;
#include "libbb.h"
-int tty_main(int argc, char **argv);
+int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tty_main(int argc, char **argv)
{
const char *s;
offsetof(uname_info_t,processor)
};
-int uname_main(int argc, char **argv);
+int uname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uname_main(int argc, char **argv)
{
uname_info_t uname_info;
return (read0write2) ? stdout : stdin;
}
-int uniq_main(int argc, char **argv);
+int uniq_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uniq_main(int argc, char **argv)
{
FILE *in, *out;
/* This is a NOFORK applet. Be very careful! */
-int usleep_main(int argc, char **argv);
+int usleep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int usleep_main(int argc, char **argv)
{
if (argc != 2) {
}
}
-int uudecode_main(int argc, char **argv);
+int uudecode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uudecode_main(int argc, char **argv)
{
FILE *src_stream = stdin;
DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3),
};
-int uuencode_main(int argc, char **argv);
+int uuencode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uuencode_main(int argc, char **argv)
{
struct stat stat_buf;
WC_LENGTH = 3
};
-int wc_main(int argc, char **argv);
+int wc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int wc_main(int argc, char **argv)
{
FILE *fp;
strcpy(str6, "old");
}
-int who_main(int argc, char **argv);
+int who_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int who_main(int argc, char **argv)
{
char str6[6];
/* This is a NOFORK applet. Be very careful! */
-int whoami_main(int argc, char **argv);
+int whoami_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int whoami_main(int argc, char **argv)
{
if (argc > 1)
/* This is a NOFORK applet. Be very careful! */
-int yes_main(int argc, char **argv);
+int yes_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int yes_main(int argc, char **argv)
{
char **first_arg;
#include "libbb.h"
-int mktemp_main(int argc, char **argv);
+int mktemp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mktemp_main(int argc, char **argv)
{
unsigned long flags = getopt32(argv, "dqt");
/* 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) MAIN_EXTERNALLY_VISIBLE;
int pipe_progress_main(int argc, char **argv)
{
RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE);
;
#endif
-int run_parts_main(int argc, char **argv);
+int run_parts_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int run_parts_main(int argc, char **argv)
{
const char *umask_p = "22";
OPT_NICELEVEL = 0x4000 * ENABLE_FEATURE_START_STOP_DAEMON_FANCY, // -N
};
-int start_stop_daemon_main(int argc, char **argv);
+int start_stop_daemon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int start_stop_daemon_main(int argc, char **argv)
{
unsigned opt;
#include "libbb.h"
-int which_main(int argc, char **argv);
+int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int which_main(int argc, char **argv)
{
int status = EXIT_SUCCESS;
#include "libbb.h"
#include "other.h"
-int mu_main(int argc, char **argv);
+int mu_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mu_main(int argc, char **argv)
{
int fd;
iterate_on_dir(name, chattr_dir_proc, gp);
}
-int chattr_main(int argc, char **argv);
+int chattr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chattr_main(int argc, char **argv)
{
struct globals g;
cancel_requested = 1;
}
-int fsck_main(int argc, char **argv);
+int fsck_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int fsck_main(int argc, char **argv)
{
int i, status = 0;
}
}
-int lsattr_main(int argc, char **argv);
+int lsattr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int lsattr_main(int argc, char **argv)
{
getopt32(argv, "Radlv");
return 0;
}
-int chattr_main(int argc, char **argv);
+int chattr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chattr_main(int argc, char **argv)
{
int i;
max_running = atoi(tmp);
}
-int fsck_main(int argc, char **argv);
+int fsck_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int fsck_main(int argc, char **argv)
{
int i, status = 0;
return 0;
}
-int lsattr_main(int argc, char **argv);
+int lsattr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int lsattr_main(int argc, char **argv)
{
int i;
if (ENABLE_FEATURE_CLEAN_UP && journal_device) free(journal_device);
}
-int tune2fs_main(int argc, char **argv);
+int tune2fs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tune2fs_main(int argc, char **argv)
{
errcode_t retval;
#undef files_happen
}
-int awk_main(int argc, char **argv);
+int awk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int awk_main(int argc, char **argv)
{
unsigned opt;
#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) MAIN_EXTERNALLY_VISIBLE;
int cmp_main(int argc, char **argv)
{
FILE *fp1, *fp2, *outfile = stdout;
#endif
-int diff_main(int argc, char **argv);
+int diff_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int diff_main(int argc, char **argv)
{
bool gotstdin = 0;
}
-int ed_main(int argc, char **argv);
+int ed_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ed_main(int argc, char **argv)
{
INIT_G();
return stat(filename, &statbuf);
}
-int patch_main(int argc, char **argv);
+int patch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int patch_main(int argc, char **argv)
{
int patch_level = -1;
free(sv);
}
-int sed_main(int argc, char **argv);
+int sed_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sed_main(int argc, char **argv)
{
enum {
fputs(out, stdout);
}
-int vi_main(int argc, char **argv);
+int vi_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int vi_main(int argc, char **argv)
{
int c;
}
-int find_main(int argc, char **argv);
+int find_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int find_main(int argc, char **argv)
{
static const char options[] ALIGN1 =
return matched;
}
-int grep_main(int argc, char **argv);
+int grep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int grep_main(int argc, char **argv)
{
FILE *file;
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) MAIN_EXTERNALLY_VISIBLE;
int xargs_main(int argc, char **argv)
{
char **args;
*/
#if defined(PROTOTYPES)
-# define APPLET(name,l,s) int name##_main(int argc, char **argv);
-# define APPLET_NOUSAGE(name,main,l,s) int main##_main(int argc, char **argv);
-# define APPLET_ODDNAME(name,main,l,s,name2) int main##_main(int argc, char **argv);
-# define APPLET_NOEXEC(name,main,l,s,name2) int main##_main(int argc, char **argv);
-# define APPLET_NOFORK(name,main,l,s,name2) int main##_main(int argc, char **argv);
+# define APPLET(name,l,s) int name##_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+# define APPLET_NOUSAGE(name,main,l,s) int main##_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+# define APPLET_ODDNAME(name,main,l,s,name2) int main##_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+# define APPLET_NOEXEC(name,main,l,s,name2) int main##_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+# define APPLET_NOFORK(name,main,l,s,name2) int main##_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
#elif defined(NAME_MAIN_CNAME)
# define APPLET(name,l,s) name name##_main name
#endif
};
+
/* Defined in appletlib.c */
extern const struct bb_applet applets[];
extern const unsigned short NUM_APPLETS;
-void bbox_prepare_main(char **argv);
+
+/* Length of these names has effect on size of libbusybox
+ * and "individual" binaries. Keep them short.
+ */
+void lbb_prepare(char **argv) MAIN_EXTERNALLY_VISIBLE;
#if ENABLE_BUILD_LIBBUSYBOX
-int libbusybox_main(int argc, char **argv);
+#if ENABLE_FEATURE_SHARED_BUSYBOX
+int lbb_main(int argc, char **argv) EXTERNALLY_VISIBLE;
+#else
+int lbb_main(int argc, char **argv);
#endif
+#endif
+
#endif /* _BB_INTERNAL_H_ */
extern int xfunc_error_retval;
extern jmp_buf die_jmp;
extern void xfunc_die(void) ATTRIBUTE_NORETURN;
-extern void bb_show_usage(void) ATTRIBUTE_NORETURN ATTRIBUTE_EXTERNALLY_VISIBLE;
+extern void bb_show_usage(void) ATTRIBUTE_NORETURN;
extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
extern void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
extern void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
extern void bb_verror_msg(const char *s, va_list p, const char *strerr);
+/* We need to export XXX_main from libbusybox
+ * only if we build "individual" binaries
+ */
+#if ENABLE_FEATURE_INDIVIDUAL
+#define MAIN_EXTERNALLY_VISIBLE EXTERNALLY_VISIBLE
+#else
+#define MAIN_EXTERNALLY_VISIBLE
+#endif
+
/* applets which are useful from another applets */
int bb_cat(char** argv);
int bb_echo(char** argv);
-int test_main(int argc, char** argv);
-int kill_main(int argc, char **argv);
+int test_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int kill_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
#if ENABLE_ROUTE
void bb_displayroutes(int noresolve, int netstatfmt);
#endif
-int chown_main(int argc, char **argv);
+int chown_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
#if ENABLE_GUNZIP
-int gunzip_main(int argc, char **argv);
+int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
#endif
int bbunpack(char **argv,
char* (*make_new_name)(char *filename),
/* -fwhole-program makes all symbols local. The attribute externally_visible
forces a symbol global. */
# if __GNUC_PREREQ (4,1)
-# define ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((__externally_visible__))
+# define EXTERNALLY_VISIBLE __attribute__(( visibility("default") ));
+//__attribute__ ((__externally_visible__))
# else
-# define ATTRIBUTE_EXTERNALLY_VISIBLE
+# define EXTERNALLY_VISIBLE
# endif /* GNUC >= 4.1 */
/* We use __extension__ in some places to suppress -pedantic warnings
#include "libbb.h"
#include <sys/reboot.h>
-int halt_main(int argc, char **argv);
+int halt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int halt_main(int argc, char **argv)
{
static const int magic[] = {
}
#endif /* FEATURE_USE_INITTAB */
-int init_main(int argc, char **argv);
+int init_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int init_main(int argc, char **argv)
{
struct init_action *a;
#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) MAIN_EXTERNALLY_VISIBLE;
int mesg_main(int argc, char **argv)
{
struct stat sb;
connection_status();
}
-int tcpudpsvd_main(int argc, char **argv);
+int tcpudpsvd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tcpudpsvd_main(int argc, char **argv)
{
char *str_c, *str_C, *str_b, *str_t;
int *const bb_errno __attribute__ ((section (".data")));
#endif
-void bbox_prepare_main(char **argv)
+void lbb_prepare(char **argv)
{
#ifdef __GLIBC__
(*(int **)&bb_errno) = __errno_location();
#if ENABLE_BUILD_LIBBUSYBOX
-int libbusybox_main(int argc, char **argv)
+int lbb_main(int argc, char **argv)
#else
int main(int argc, char **argv)
#endif
{
- bbox_prepare_main(argv);
+ lbb_prepare(argv);
#if !BB_MMU
/* NOMMU re-exec trick sets high-order bit in first byte of name */
* If called with two non-option arguments, addgroup
* will add an existing user to an existing group.
*/
-int addgroup_main(int argc, char **argv);
+int addgroup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int addgroup_main(int argc, char **argv)
{
char *group;
*
* can be customized via command-line parameters.
*/
-int adduser_main(int argc, char **argv);
+int adduser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int adduser_main(int argc, char **argv)
{
struct passwd pw;
#define OPT_ENC 1
#define OPT_MD5 2
-int chpasswd_main(int argc, char **argv);
+int chpasswd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chpasswd_main(int argc, char **argv)
{
char *name, *pass;
#include "libbb.h"
-int cryptpw_main(int argc, char **argv);
+int cryptpw_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cryptpw_main(int argc, char **argv)
{
char salt[sizeof("$N$XXXXXXXX")];
free(new);
}
-int deluser_main(int argc, char **argv);
+int deluser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int deluser_main(int argc, char **argv)
{
if (argc == 2
#endif /* SYSV_STYLE */
-int getty_main(int argc, char **argv);
+int getty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int getty_main(int argc, char **argv)
{
int nullfd;
exit(EXIT_SUCCESS);
}
-int login_main(int argc, char **argv);
+int login_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int login_main(int argc, char **argv)
{
enum {
return ret;
}
-int passwd_main(int argc, char **argv);
+int passwd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int passwd_main(int argc, char **argv)
{
enum {
#define SU_OPT_mp (3)
#define SU_OPT_l (4)
-int su_main(int argc, char **argv);
+int su_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int su_main(int argc, char **argv)
{
unsigned flags;
}
-int sulogin_main(int argc, char **argv);
+int sulogin_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sulogin_main(int argc, char **argv)
{
char *cp;
ioctl(vfd, VT_RELDISP, VT_ACKACQ);
}
-int vlock_main(int argc, char **argv);
+int vlock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int vlock_main(int argc, char **argv)
{
sigset_t sig;
"clock not synchronized"
};
-int adjtimex_main(int argc, char **argv);
+int adjtimex_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int adjtimex_main(int argc, char **argv)
{
enum {
#include "libbb.h"
#include "bbconfigopts.h"
-int bbconfig_main(int argc, char **argv);
+int bbconfig_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int bbconfig_main(int argc, char **argv)
{
printf(bbconfig_config);
#define OPT_f (1<<3)
#define OPT_o (1<<4)
-int chrt_main(int argc, char** argv);
-int chrt_main(int argc, char** argv)
+int chrt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int chrt_main(int argc, char **argv)
{
pid_t pid = 0;
unsigned opt;
}
}
-int crond_main(int ac, char **av);
+int crond_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int crond_main(int ac, char **av)
{
unsigned opt;
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 argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int crontab_main(int ac, char **av)
{
enum { NONE, EDIT, LIST, REPLACE, DELETE } option = NONE;
return i;
}
-int dc_main(int argc, char **argv);
+int dc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dc_main(int argc, char **argv)
{
/* take stuff from stdin if no args are given */
/* Public functions follow */
-int devfsd_main(int argc, char **argv);
+int devfsd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int devfsd_main(int argc, char **argv)
{
int print_version = FALSE;
#define FLAG_CLOSE 1
#define FLAG_SMART 2
-int eject_main(int argc, char **argv);
+int eject_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int eject_main(int argc, char **argv)
{
unsigned long flags;
/*-------------------------------------*/
/* our main() routine: */
-int hdparm_main(int argc, char **argv);
+int hdparm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int hdparm_main(int argc, char **argv)
{
int c;
#error struct utmp member char[] size(s) have changed!
#endif
-int last_main(int argc, char **argv);
+int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int last_main(int argc, char **argv)
{
struct utmp ut;
exit(1);
}
-int less_main(int argc, char **argv);
+int less_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int less_main(int argc, char **argv)
{
int keypress;
#include "libbb.h"
#if ENABLE_FEATURE_MAKEDEVS_LEAF
-int makedevs_main(int argc, char **argv);
+int makedevs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int makedevs_main(int argc, char **argv)
{
mode_t mode;
/* 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) MAIN_EXTERNALLY_VISIBLE;
int makedevs_main(int argc, char **argv)
{
FILE *table = stdin;
*/
#include "libbb.h"
-int microcom_main(int argc, char **argv);
+int microcom_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int microcom_main(int argc, char **argv)
{
struct pollfd pfd[2];
#include "libbb.h"
-int mountpoint_main(int argc, char **argv);
+int mountpoint_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mountpoint_main(int argc, char **argv)
{
struct stat st;
{0, 0}
};
-int mt_main(int argc, char **argv);
+int mt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mt_main(int argc, char **argv)
{
const char *file = "/dev/tape";
#include <linux/major.h>
#include <linux/raid/md_u.h>
-int raidautorun_main(int argc, char **argv);
+int raidautorun_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int raidautorun_main(int argc, char **argv)
{
if (argc != 2)
#include "libbb.h"
-int readahead_main(int argc, char **argv);
+int readahead_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int readahead_main(int argc, char **argv)
{
FILE *f;
#include <utmp.h>
#include "libbb.h"
-int runlevel_main(int argc, char **argv);
+int runlevel_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int runlevel_main(int argc, char **argv)
{
struct utmp *ut;
{
}
-int rx_main(int argc, char **argv);
+int rx_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int rx_main(int argc, char **argv)
{
char *fn;
#include "libbb.h"
-int setsid_main(int argc, char **argv);
+int setsid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int setsid_main(int argc, char **argv)
{
if (argc < 2)
#define PRINT_OFFSET 4
#define SIZE 8
-int strings_main(int argc, char **argv);
+int strings_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int strings_main(int argc, char **argv)
{
int n, c, status = EXIT_SUCCESS;
#define OPT_p 1
-int taskset_main(int argc, char** argv);
-int taskset_main(int argc, char** argv)
+int taskset_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int taskset_main(int argc, char **argv)
{
cpu_set_t mask, new_mask;
pid_t pid = 0;
signal(SIGQUIT, quit_signal);
}
-int time_main(int argc, char **argv);
+int time_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int time_main(int argc, char **argv)
{
resource_t res;
*/
#include "libbb.h"
-int ttysize_main(int argc, char **argv);
+int ttysize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ttysize_main(int argc, char **argv)
{
unsigned w,h;
exit(0);
}
-int watchdog_main(int argc, char **argv);
+int watchdog_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int watchdog_main(int argc, char **argv)
{
unsigned opts;
#endif
#if ENABLE_FEATURE_2_6_MODULES
-extern int insmod_ng_main(int argc, char **argv);
+extern int insmod_ng_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
#endif
void print_load_map(struct obj_file *f);
#endif
-int insmod_main( int argc, char **argv);
-int insmod_main( int argc, char **argv)
+int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int insmod_main(int argc, char **argv)
{
char *opt_o, *arg1;
int len;
}
}
-int insmod_ng_main(int argc, char **argv);
+int insmod_ng_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int insmod_ng_main(int argc, char **argv)
{
long ret;
NEW_MOD_INITIALIZING = 64
};
-int lsmod_main(int argc, char **argv);
+int lsmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int lsmod_main(int argc, char **argv)
{
struct module_info info;
#else /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */
-int lsmod_main(int argc, char **argv);
+int lsmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int lsmod_main(int argc, char **argv)
{
FILE *file = xfopen("/proc/modules", "r");
return rc;
}
-int modprobe_main(int argc, char** argv);
-int modprobe_main(int argc, char** argv)
+int modprobe_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int modprobe_main(int argc, char **argv)
{
int rc = EXIT_SUCCESS;
char *unused;
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) MAIN_EXTERNALLY_VISIBLE;
int rmmod_main(int argc, char **argv)
{
int n, ret = EXIT_SUCCESS;
return 0;
}
-int arp_main(int argc, char **argv);
+int arp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int arp_main(int argc, char **argv)
{
char *hw_type;
return 1;
}
-int arping_main(int argc, char **argv);
+int arping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int arping_main(int argc, char **argv)
{
const char *device = "eth0";
exit(2);
}
-int dnsd_main(int argc, char **argv);
+int dnsd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dnsd_main(int argc, char **argv)
{
const char *listen_interface = "0.0.0.0";
return byte_cnt;
}
-int ether_wake_main(int argc, char **argv);
+int ether_wake_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ether_wake_main(int argc, char **argv)
{
const char *ifname = "eth0";
;
#endif
-int ftpgetput_main(int argc, char **argv);
+int ftpgetput_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ftpgetput_main(int argc, char **argv)
{
/* content-length of the file */
}
}
-int hostname_main(int argc, char **argv);
+int hostname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int hostname_main(int argc, char **argv)
{
enum {
};
-int httpd_main(int argc, char **argv);
+int httpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int httpd_main(int argc, char **argv)
{
int server_socket = server_socket; /* for gcc */
* Our main function.
*/
-int ifconfig_main(int argc, char **argv);
+int ifconfig_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ifconfig_main(int argc, char **argv)
{
struct ifreq ifr;
}
-int ifupdown_main(int argc, char **argv);
+int ifupdown_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ifupdown_main(int argc, char **argv)
{
int (*cmds)(struct interface_defn_t *) = NULL;
#endif
-int inetd_main(int argc, char **argv);
+int inetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int inetd_main(int argc, char **argv)
{
servtab_t *sep;
}
#if ENABLE_FEATURE_IP_ADDRESS
-int ipaddr_main(int argc, char **argv);
+int ipaddr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ipaddr_main(int argc, char **argv)
{
ip_func = do_ipaddr;
}
#endif
#if ENABLE_FEATURE_IP_LINK
-int iplink_main(int argc, char **argv);
+int iplink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int iplink_main(int argc, char **argv)
{
ip_func = do_iplink;
}
#endif
#if ENABLE_FEATURE_IP_ROUTE
-int iproute_main(int argc, char **argv);
+int iproute_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int iproute_main(int argc, char **argv)
{
ip_func = do_iproute;
}
#endif
#if ENABLE_FEATURE_IP_RULE
-int iprule_main(int argc, char **argv);
+int iprule_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int iprule_main(int argc, char **argv)
{
ip_func = do_iprule;
}
#endif
#if ENABLE_FEATURE_IP_TUNNEL
-int iptunnel_main(int argc, char **argv);
+int iptunnel_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int iptunnel_main(int argc, char **argv)
{
ip_func = do_iptunnel;
#endif
-int ip_main(int argc, char **argv);
+int ip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ip_main(int argc, char **argv)
{
static const char keywords[] ALIGN1 =
;
#endif
-int ipcalc_main(int argc, char **argv);
+int ipcalc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ipcalc_main(int argc, char **argv)
{
unsigned opt;
while (do_rd(0, (void*)&buf) == 0);
}
-int fakeidentd_main(int argc, char **argv);
+int fakeidentd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int fakeidentd_main(int argc, char **argv)
{
enum {
return mac;
}
-int nameif_main(int argc, char **argv);
+int nameif_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nameif_main(int argc, char **argv)
{
mactable_t *clist = NULL;
bb_error_msg_and_die("timed out");
}
-int nc_main(int argc, char **argv);
+int nc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nc_main(int argc, char **argv)
{
/* sfd sits _here_ only because of "repeat" option (-l -l). */
} /* readwrite */
/* main: now we pull it all together... */
-int nc_main(int argc, char **argv);
+int nc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nc_main(int argc, char **argv)
{
char *str_p, *str_s, *str_w;
* Our main function.
*/
-int netstat_main(int argc, char **argv);
+int netstat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int netstat_main(int argc, char **argv)
{
const char *net_conn_line_header = PRINT_NET_CONN_HEADER;
}
}
-int nslookup_main(int argc, char **argv);
+int nslookup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nslookup_main(int argc, char **argv)
{
/* We allow 1 or 2 arguments.
}
#endif
-int ping_main(int argc, char **argv);
+int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ping_main(int argc, char **argv)
{
len_and_sockaddr *lsa;
ping4(lsa);
}
-int ping_main(int argc, char **argv);
+int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ping_main(int argc, char **argv)
{
len_and_sockaddr *lsa;
#if ENABLE_PING6
-int ping6_main(int argc, char **argv);
+int ping6_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ping6_main(int argc, char **argv)
{
argv[0] = (char*)"-6";
/* We don't expect to see 1000+ seconds delay, unsigned is enough */
#define MONOTONIC_US() ((unsigned)monotonic_us())
-int pscan_main(int argc, char **argv);
+int pscan_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int pscan_main(int argc, char **argv)
{
const char *opt_max_port = "1024"; /* -P: default max port */
"\010\002delete" /* Since it's last, we can save a byte. */
;
-int route_main(int argc, char **argv);
+int route_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int route_main(int argc, char **argv)
{
unsigned opt;
restore_state_and_exit(0);
}
-int slattach_main(int argc, char **argv);
+int slattach_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int slattach_main(int argc, char **argv)
{
/* Line discipline code table */
tcsetattr(0, TCSADRAIN, &G.termios_def);
}
-int telnet_main(int argc, char** argv);
-int telnet_main(int argc, char** argv)
+int telnet_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int telnet_main(int argc, char **argv)
{
char *host;
int port;
#endif
-int telnetd_main(int argc, char **argv);
+int telnetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int telnetd_main(int argc, char **argv)
{
fd_set rdfdset, wrfdset;
return finished == 0; /* returns 1 on failure */
}
-int tftp_main(int argc, char **argv);
+int tftp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tftp_main(int argc, char **argv)
{
len_and_sockaddr *peer_lsa;
printf(" %u.%03u ms", tt/1000, tt%1000);
}
-int traceroute_main(int argc, char **argv);
+int traceroute_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int traceroute_main(int argc, char **argv)
{
int code, n;
}
-int udhcpc_main(int argc, char **argv);
+int udhcpc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int udhcpc_main(int argc, char **argv)
{
uint8_t *temp, *message;
/* struct server_config_t server_config is in bb_common_bufsiz1 */
-int udhcpd_main(int argc, char **argv);
+int udhcpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int udhcpd_main(int argc, char **argv)
{
fd_set rfds;
}
}
-int dhcprelay_main(int argc, char **argv);
+int dhcprelay_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dhcprelay_main(int argc, char **argv)
{
int num_sockets, max_socket;
#include "common.h"
#include "dhcpd.h"
-int dumpleases_main(int argc, char **argv);
+int dumpleases_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dumpleases_main(int argc, char **argv)
{
int fd;
static const char conf_file_name[] ALIGN1 = "/proc/net/vlan/config";
-int vconfig_main(int argc, char **argv);
+int vconfig_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int vconfig_main(int argc, char **argv)
{
struct vlan_ioctl_args ifr;
}
-int wget_main(int argc, char **argv);
+int wget_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int wget_main(int argc, char **argv)
{
char buf[512];
/**
* main program
*/
-int zcip_main(int argc, char **argv);
+int zcip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int zcip_main(int argc, char **argv)
{
int state = PROBE;
#include "libbb.h"
-int free_main(int argc, char **argv);
+int free_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int free_main(int argc, char **argv)
{
struct sysinfo info;
return success;
}
-int fuser_main(int argc, char **argv);
+int fuser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int fuser_main(int argc, char **argv)
{
/*static -- huh???*/ int opt = 0; /* FUSER_OPT_ */
* This is needed to avoid collision with kill -9 ... syntax
*/
-int kill_main(int argc, char **argv);
+int kill_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int kill_main(int argc, char **argv)
{
char *arg;
init_cr
};
-int nmeter_main(int argc, char **argv);
+int nmeter_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nmeter_main(int argc, char **argv)
{
char buf[32];
kill(pid, signo);
}
-int pgrep_main(int argc, char **argv);
+int pgrep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int pgrep_main(int argc, char **argv)
{
unsigned pid = getpid();
OPT_OMIT = USE_FEATURE_PIDOF_OMIT( (1<<OPTBIT_OMIT )) + 0,
};
-int pidof_main(int argc, char **argv);
+int pidof_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int pidof_main(int argc, char **argv)
{
unsigned first = 1;
printf("%.*s\n", terminal_width, buffer);
}
-int ps_main(int argc, char **argv);
+int ps_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ps_main(int argc, char **argv)
{
procps_status_t *p;
#else /* !ENABLE_DESKTOP */
-int ps_main(int argc, char **argv);
+int ps_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ps_main(int argc, char **argv)
{
procps_status_t *p = NULL;
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) MAIN_EXTERNALLY_VISIBLE;
int renice_main(int argc, char **argv)
{
static const char Xetpriority_msg[] ALIGN1 = "%cetpriority";
/*
* sysctl_main()...
*/
-int sysctl_main(int argc, char **argv);
+int sysctl_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sysctl_main(int argc, char **argv)
{
int retval = 0;
| PSSCAN_COMM,
};
-int top_main(int argc, char **argv);
+int top_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int top_main(int argc, char **argv)
{
int count, lines, col;
#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) MAIN_EXTERNALLY_VISIBLE;
int uptime_main(int argc, char **argv)
{
int updays, uphours, upminutes;
//
// (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) MAIN_EXTERNALLY_VISIBLE;
int watch_main(int argc, char **argv)
{
unsigned opt;
static void envdir(int, char **) ATTRIBUTE_NORETURN;
static void softlimit(int, char **) ATTRIBUTE_NORETURN;
-int chpst_main(int argc, char **argv);
+int chpst_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chpst_main(int argc, char **argv)
{
INIT_G();
return 1;
}
-int runsv_main(int argc, char **argv);
+int runsv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int runsv_main(int argc, char **argv)
{
struct stat s;
return 1;
}
-int runsvdir_main(int argc, char **argv);
+int runsvdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int runsvdir_main(int argc, char **argv)
{
struct stat s;
return 1;
}
-int sv_main(int argc, char **argv);
+int sv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sv_main(int argc, char **argv)
{
unsigned opt;
}
}
-int svlogd_main(int argc, char **argv);
+int svlogd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int svlogd_main(int argc, char **argv)
{
char *r,*l,*b;
# --enable-new-dtags ?
# -z,combreloc ?
# -soname="libbusybox.so.$BB_VER"
-# --undefined=libbusybox_main Seed name to start pulling from
+# --undefined=lbb_main Seed name to start pulling from
# (otherwise we'll need --whole-archive)
# -static Not used, but may be useful! manpage:
# "... This option can be used with -shared.
-Wl,--enable-new-dtags \
-Wl,-z,combreloc \
-Wl,-soname="libbusybox.so.$BB_VER" \
- -Wl,--undefined=libbusybox_main \
+ -Wl,--undefined=lbb_main \
-Wl,--sort-common \
-Wl,--sort-section -Wl,alignment \
-Wl,--start-group $A_FILES -Wl,--end-group \
while read name main junk; do
echo "\
-void bbox_prepare_main(char **argv);
+void lbb_prepare(char **argv);
int $main(int argc, char **argv);
const char *applet_name = \"$name\";
int main(int argc, char **argv)
{
- bbox_prepare_main(argv);
+ lbb_prepare(argv);
return $main(argc, argv);
}
" >"$sharedlib_dir/applet.c"
;
#endif
-int chcon_main(int argc, char **argv);
+int chcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chcon_main(int argc, char **argv)
{
char *reference_file;
#include "libbb.h"
-int getenforce_main(int argc, char **argv);
+int getenforce_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int getenforce_main(int argc, char **argv)
{
int rc;
#include "libbb.h"
-int getsebool_main(int argc, char **argv);
+int getsebool_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int getsebool_main(int argc, char **argv)
{
int i, rc = 0, active, pending, len = 0;
*/
#include "libbb.h"
-int load_policy_main(int argc, char **argv);
+int load_policy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int load_policy_main(int argc, char **argv)
{
int rc;
#define OPT_PREFIX (1<<3) /* -p */
#define OPT_VERIFY (1<<4) /* -V */
-int matchpathcon_main(int argc, char **argv);
+int matchpathcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int matchpathcon_main(int argc, char **argv)
{
int error = 0;
#define OPTS_HELP (1<<5) /* h */
#define OPTS_CONTEXT_COMPONENT (OPTS_ROLE | OPTS_TYPE | OPTS_USER | OPTS_RANGE)
-int runcon_main(int argc, char **argv);
+int runcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int runcon_main(int argc, char **argv)
{
char *role = NULL;
*/
#include "libbb.h"
-int selinuxenabled_main(int argc, char **argv);
+int selinuxenabled_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int selinuxenabled_main(int argc, char **argv)
{
return !is_selinux_enabled();
NULL,
};
-int setenforce_main(int argc, char **argv);
+int setenforce_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int setenforce_main(int argc, char **argv)
{
int i, rc;
goto out;
}
-int setfiles_main(int argc, char **argv);
+int setfiles_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int setfiles_main(int argc, char **argv)
{
struct stat sb;
* exception occurs. When an exception occurs the variable "state"
* is used to figure out how far we had gotten.
*/
-int ash_main(int argc, char **argv);
+int ash_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ash_main(int argc, char **argv)
{
char *shinit;
}
}
-int bbsh_main(int argc, char **argv);
+int bbsh_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int bbsh_main(int argc, char **argv)
{
char *command=NULL;
}
#endif
-int hush_main(int argc, char **argv);
+int hush_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int hush_main(int argc, char **argv)
{
static const char version_str[] ALIGN1 = "HUSH_VERSION="HUSH_VER_STR;
}
#endif
-int lash_main(int argc_l, char **argv_l);
+int lash_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int lash_main(int argc_l, char **argv_l)
{
unsigned opt;
* shell
*/
-int msh_main(int argc, char **argv);
+int msh_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int msh_main(int argc, char **argv)
{
int f;
#define KLOGD_LOGBUF_SIZE BUFSIZ
#define log_buffer bb_common_bufsiz1
-int klogd_main(int argc, char **argv);
+int klogd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int klogd_main(int argc, char **argv)
{
int i = i; /* silence gcc */
}
-int logger_main(int argc, char **argv);
+int logger_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int logger_main(int argc, char **argv)
{
char *str_p, *str_t;
exit(0);
}
-int logread_main(int argc, char **argv);
+int logread_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int logread_main(int argc, char **argv)
{
int cur;
} /* for */
}
-int syslogd_main(int argc, char **argv);
+int syslogd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int syslogd_main(int argc, char **argv)
{
char OPTION_DECL;
#include <sys/klog.h>
#include "libbb.h"
-int dmesg_main(int argc, char **argv);
+int dmesg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dmesg_main(int argc, char **argv)
{
char *size, *level;
#ifdef STANDALONE
int main(int argc, char **argv)
#else
-int fbset_main(int argc, char **argv);
+int fbset_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int fbset_main(int argc, char **argv)
#endif
{
/* vi: set sw=4 ts=4: */
/* fdformat.c - Low-level formats a floppy disk - Werner Almesberger */
-/* 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>
- * - added Native Language Support
- * 1999-03-20 Arnaldo Carvalho de Melo <acme@conectiva.com.br>
- * - more i18n/nls translatable strings marked
- *
- * 5 July 2003 -- modified for Busybox by Erik Andersen
+/* 5 July 2003 -- modified for Busybox by Erik Andersen
*/
#include "libbb.h"
#define FDGETPRM _IOR(2, 0x04, struct floppy_struct)
#define FD_FILL_BYTE 0xF6 /* format fill byte. */
-int fdformat_main(int argc,char **argv);
-int fdformat_main(int argc,char **argv)
+int fdformat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int fdformat_main(int argc, char **argv)
{
int fd, n, cyl, read_bytes, verify;
unsigned char *data;
/* Check backwards so we don't need a counter */
while (--read_bytes >= 0) {
if (data[read_bytes] != FD_FILL_BYTE) {
- printf("bad data in cyl %d\nContinuing... ",cyl);
+ printf("bad data in cyl %d\nContinuing... ", cyl);
}
}
}
}
#endif
-int fdisk_main(int argc, char **argv);
+int fdisk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int fdisk_main(int argc, char **argv)
{
char *str_b, *str_C, *str_H, *str_S;
/* From <linux/fd.h> */
#define FDFLUSH _IO(2,0x4b)
-int freeramdisk_main(int argc, char **argv);
+int freeramdisk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int freeramdisk_main(int argc, char **argv)
{
int fd;
void check2(void);
#endif
-int fsck_minix_main(int argc, char **argv);
+int fsck_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int fsck_minix_main(int argc, char **argv)
{
struct termios tmp;
;
#endif
-int getopt_main(int argc, char *argv[]);
-int getopt_main(int argc, char *argv[])
+int getopt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int getopt_main(int argc, char **argv)
{
char *optstr = NULL;
char *name = NULL;
{ }
};
-int hexdump_main(int argc, char **argv);
+int hexdump_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int hexdump_main(int argc, char **argv)
{
const char *p;
#define HWCLOCK_OPT_SYSTOHC 0x10
#define HWCLOCK_OPT_RTCFILE 0x20
-int hwclock_main(int argc, char **argv);
+int hwclock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int hwclock_main(int argc, char **argv)
{
unsigned opt;
#endif /* IPCRM_LEGACY */
-int ipcrm_main(int argc, char **argv);
+int ipcrm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ipcrm_main(int argc, char **argv)
{
int c;
bb_putchar('\n');
}
-int ipcs_main(int argc, char **argv);
+int ipcs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ipcs_main(int argc, char **argv)
{
int id = 0;
#include "libbb.h"
-int losetup_main(int argc, char **argv);
+int losetup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int losetup_main(int argc, char **argv)
{
char dev[] = LOOP_NAME"0";
}
}
-int mdev_main(int argc, char **argv);
+int mdev_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mdev_main(int argc, char **argv)
{
char *action;
printf("Maxsize=%ld\n", (long)SB_MAXSIZE);
}
-int mkfs_minix_main(int argc, char **argv);
+int mkfs_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mkfs_minix_main(int argc, char **argv)
{
struct mntent *mp;
#include "libbb.h"
-int mkswap_main(int argc, char **argv);
+int mkswap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mkswap_main(int argc, char **argv)
{
int fd, pagesize;
#define CONVERTED_TAB_SIZE 8
-int more_main(int argc, char **argv);
+int more_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int more_main(int argc, char **argv)
{
int c = c; /* for gcc */
static const char must_be_root[] ALIGN1 = "you must be root";
-int mount_main(int argc, char **argv);
+int mount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mount_main(int argc, char **argv)
{
enum { OPT_ALL = 0x10 };
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) MAIN_EXTERNALLY_VISIBLE;
int pivot_root_main(int argc, char **argv)
{
if (argc != 3)
return ntohl(nett) - RFC_868_BIAS;
}
-int rdate_main(int argc, char **argv);
+int rdate_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int rdate_main(int argc, char **argv)
{
time_t remote_time;
static const char defaultmap[] ALIGN1 = "/boot/System.map";
static const char defaultpro[] ALIGN1 = "/proc/profile";
-int readprofile_main(int argc, char **argv);
+int readprofile_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int readprofile_main(int argc, char **argv)
{
FILE *map;
#include "libbb.h"
-int setarch_main(int ATTRIBUTE_UNUSED argc, char **argv);
+int setarch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int setarch_main(int ATTRIBUTE_UNUSED argc, char **argv)
{
int pers = -1;
return err;
}
-int swap_on_off_main(int argc, char **argv);
+int swap_on_off_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int swap_on_off_main(int argc, char **argv)
{
int ret;
} else unlink(directory);
}
-int switch_root_main(int argc, char **argv);
+int switch_root_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int switch_root_main(int argc, char **argv)
{
char *newroot, *console = NULL;
#define OPT_REMOUNT (1 << 4)
#define OPT_ALL (ENABLE_FEATURE_UMOUNT_ALL ? (1 << 5) : 0)
-int umount_main(int argc, char **argv);
+int umount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int umount_main(int argc, char **argv)
{
int doForce;