aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-10-11 10:05:36 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-10-11 10:05:36 +0000
commit9b49a5ed8551e46892af3f676e5d96d21b540e3c (patch)
tree3d177ef7f3f5e8338690718c86012203ef29a7da /util-linux
parent8d82cf72c99a8ab8bdbb0b179a1f1135a004c47a (diff)
downloadbusybox-9b49a5ed8551e46892af3f676e5d96d21b540e3c.tar.gz
add -fvisibility=hidden to CC flags, mark XXX_main functions
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/dmesg.c2
-rw-r--r--util-linux/fbset.c2
-rw-r--r--util-linux/fdformat.c13
-rw-r--r--util-linux/fdisk.c2
-rw-r--r--util-linux/freeramdisk.c2
-rw-r--r--util-linux/fsck_minix.c2
-rw-r--r--util-linux/getopt.c4
-rw-r--r--util-linux/hexdump.c2
-rw-r--r--util-linux/hwclock.c2
-rw-r--r--util-linux/ipcrm.c2
-rw-r--r--util-linux/ipcs.c2
-rw-r--r--util-linux/losetup.c2
-rw-r--r--util-linux/mdev.c2
-rw-r--r--util-linux/mkfs_minix.c2
-rw-r--r--util-linux/mkswap.c2
-rw-r--r--util-linux/more.c2
-rw-r--r--util-linux/mount.c2
-rw-r--r--util-linux/pivot_root.c2
-rw-r--r--util-linux/rdate.c2
-rw-r--r--util-linux/readprofile.c2
-rw-r--r--util-linux/setarch.c2
-rw-r--r--util-linux/swaponoff.c2
-rw-r--r--util-linux/switch_root.c2
-rw-r--r--util-linux/umount.c2
24 files changed, 28 insertions, 33 deletions
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c
index 3aa99e58f..1adb0fc2f 100644
--- a/util-linux/dmesg.c
+++ b/util-linux/dmesg.c
@@ -12,7 +12,7 @@
#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;
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index a2b8b3800..f67a283c1 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -309,7 +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) MAIN_EXTERNALLY_VISIBLE;
int fbset_main(int argc, char **argv)
#endif
{
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c
index dc45e23c0..c4f97ae34 100644
--- a/util-linux/fdformat.c
+++ b/util-linux/fdformat.c
@@ -1,12 +1,7 @@
/* 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"
@@ -45,8 +40,8 @@ struct format_descr {
#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;
@@ -116,7 +111,7 @@ int fdformat_main(int argc,char **argv)
/* 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);
}
}
}
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 9f30571e9..01c01bd24 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -2735,7 +2735,7 @@ unknown_command(int c)
}
#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;
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c
index 4bd93781b..bde6afc0a 100644
--- a/util-linux/freeramdisk.c
+++ b/util-linux/freeramdisk.c
@@ -14,7 +14,7 @@
/* From <linux/fd.h> */
#define FDFLUSH _IO(2,0x4b)
-int freeramdisk_main(int argc, char **argv);
+int freeramdisk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int freeramdisk_main(int argc, char **argv)
{
int fd;
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index 5f92f3511..deb82f75b 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -1249,7 +1249,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) MAIN_EXTERNALLY_VISIBLE;
int fsck_minix_main(int argc, char **argv)
{
struct termios tmp;
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index 4767d586c..061750e77 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -279,8 +279,8 @@ static const char getopt_longopts[] ALIGN1 =
;
#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;
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c
index e294f19da..e6820ae8d 100644
--- a/util-linux/hexdump.c
+++ b/util-linux/hexdump.c
@@ -54,7 +54,7 @@ static const struct suffix_mult suffixes[] = {
{ }
};
-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;
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
index 09b09eb6f..f91379bed 100644
--- a/util-linux/hwclock.c
+++ b/util-linux/hwclock.c
@@ -171,7 +171,7 @@ static int check_utc(void)
#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;
diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c
index f49d28ee2..a9400d174 100644
--- a/util-linux/ipcrm.c
+++ b/util-linux/ipcrm.c
@@ -76,7 +76,7 @@ static int remove_ids(type_id type, int argc, char **argv)
#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;
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c
index d5325902b..c7b46f589 100644
--- a/util-linux/ipcs.c
+++ b/util-linux/ipcs.c
@@ -558,7 +558,7 @@ static void print_sem(int semid)
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;
diff --git a/util-linux/losetup.c b/util-linux/losetup.c
index c61af3d29..a9ecfd58b 100644
--- a/util-linux/losetup.c
+++ b/util-linux/losetup.c
@@ -11,7 +11,7 @@
#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";
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index 33dc5d38f..a9c146942 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -287,7 +287,7 @@ static void load_firmware(const char *const firmware, const char *const sysfs_pa
}
}
-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;
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 2b0697ae5..de9dde32b 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -603,7 +603,7 @@ static void setup_tables(void)
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;
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index 88f1fbb03..af4cc10f7 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -8,7 +8,7 @@
#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;
diff --git a/util-linux/more.c b/util-linux/more.c
index 0a21a9afa..ee559b102 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -52,7 +52,7 @@ static void gotsig(int sig)
#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 */
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 10ada5426..7c58aefb9 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -1559,7 +1559,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
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 };
diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c
index 929ed30db..28af00cc1 100644
--- a/util-linux/pivot_root.c
+++ b/util-linux/pivot_root.c
@@ -12,7 +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) MAIN_EXTERNALLY_VISIBLE;
int pivot_root_main(int argc, char **argv)
{
if (argc != 3)
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index 4387f04de..150efbec4 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -42,7 +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) MAIN_EXTERNALLY_VISIBLE;
int rdate_main(int argc, char **argv)
{
time_t remote_time;
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c
index 152137654..dbe7c7171 100644
--- a/util-linux/readprofile.c
+++ b/util-linux/readprofile.c
@@ -41,7 +41,7 @@
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;
diff --git a/util-linux/setarch.c b/util-linux/setarch.c
index 08294e55c..dbc02de5e 100644
--- a/util-linux/setarch.c
+++ b/util-linux/setarch.c
@@ -11,7 +11,7 @@
#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;
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index db43aa52a..6858d2619 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -58,7 +58,7 @@ static int do_em_all(void)
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;
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c
index e4e9e21ad..700f7997e 100644
--- a/util-linux/switch_root.c
+++ b/util-linux/switch_root.c
@@ -64,7 +64,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) MAIN_EXTERNALLY_VISIBLE;
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 c57a49ef4..17d88b388 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -21,7 +21,7 @@
#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;