diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-10-11 10:05:36 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-10-11 10:05:36 +0000 |
commit | 9b49a5ed8551e46892af3f676e5d96d21b540e3c (patch) | |
tree | 3d177ef7f3f5e8338690718c86012203ef29a7da /util-linux | |
parent | 8d82cf72c99a8ab8bdbb0b179a1f1135a004c47a (diff) | |
download | busybox-w32-9b49a5ed8551e46892af3f676e5d96d21b540e3c.tar.gz busybox-w32-9b49a5ed8551e46892af3f676e5d96d21b540e3c.tar.bz2 busybox-w32-9b49a5ed8551e46892af3f676e5d96d21b540e3c.zip |
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.c | 2 | ||||
-rw-r--r-- | util-linux/fbset.c | 2 | ||||
-rw-r--r-- | util-linux/fdformat.c | 13 | ||||
-rw-r--r-- | util-linux/fdisk.c | 2 | ||||
-rw-r--r-- | util-linux/freeramdisk.c | 2 | ||||
-rw-r--r-- | util-linux/fsck_minix.c | 2 | ||||
-rw-r--r-- | util-linux/getopt.c | 4 | ||||
-rw-r--r-- | util-linux/hexdump.c | 2 | ||||
-rw-r--r-- | util-linux/hwclock.c | 2 | ||||
-rw-r--r-- | util-linux/ipcrm.c | 2 | ||||
-rw-r--r-- | util-linux/ipcs.c | 2 | ||||
-rw-r--r-- | util-linux/losetup.c | 2 | ||||
-rw-r--r-- | util-linux/mdev.c | 2 | ||||
-rw-r--r-- | util-linux/mkfs_minix.c | 2 | ||||
-rw-r--r-- | util-linux/mkswap.c | 2 | ||||
-rw-r--r-- | util-linux/more.c | 2 | ||||
-rw-r--r-- | util-linux/mount.c | 2 | ||||
-rw-r--r-- | util-linux/pivot_root.c | 2 | ||||
-rw-r--r-- | util-linux/rdate.c | 2 | ||||
-rw-r--r-- | util-linux/readprofile.c | 2 | ||||
-rw-r--r-- | util-linux/setarch.c | 2 | ||||
-rw-r--r-- | util-linux/swaponoff.c | 2 | ||||
-rw-r--r-- | util-linux/switch_root.c | 2 | ||||
-rw-r--r-- | util-linux/umount.c | 2 |
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 @@ | |||
12 | #include <sys/klog.h> | 12 | #include <sys/klog.h> |
13 | #include "libbb.h" | 13 | #include "libbb.h" |
14 | 14 | ||
15 | int dmesg_main(int argc, char **argv); | 15 | int dmesg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
16 | int dmesg_main(int argc, char **argv) | 16 | int dmesg_main(int argc, char **argv) |
17 | { | 17 | { |
18 | char *size, *level; | 18 | 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) | |||
309 | #ifdef STANDALONE | 309 | #ifdef STANDALONE |
310 | int main(int argc, char **argv) | 310 | int main(int argc, char **argv) |
311 | #else | 311 | #else |
312 | int fbset_main(int argc, char **argv); | 312 | int fbset_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
313 | int fbset_main(int argc, char **argv) | 313 | int fbset_main(int argc, char **argv) |
314 | #endif | 314 | #endif |
315 | { | 315 | { |
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 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* fdformat.c - Low-level formats a floppy disk - Werner Almesberger */ | 2 | /* fdformat.c - Low-level formats a floppy disk - Werner Almesberger */ |
3 | 3 | ||
4 | /* 1999-02-22 Arkadiusz Mi�kiewicz <misiek@pld.ORG.PL> | 4 | /* 5 July 2003 -- modified for Busybox by Erik Andersen |
5 | * - added Native Language Support | ||
6 | * 1999-03-20 Arnaldo Carvalho de Melo <acme@conectiva.com.br> | ||
7 | * - more i18n/nls translatable strings marked | ||
8 | * | ||
9 | * 5 July 2003 -- modified for Busybox by Erik Andersen | ||
10 | */ | 5 | */ |
11 | 6 | ||
12 | #include "libbb.h" | 7 | #include "libbb.h" |
@@ -45,8 +40,8 @@ struct format_descr { | |||
45 | #define FDGETPRM _IOR(2, 0x04, struct floppy_struct) | 40 | #define FDGETPRM _IOR(2, 0x04, struct floppy_struct) |
46 | #define FD_FILL_BYTE 0xF6 /* format fill byte. */ | 41 | #define FD_FILL_BYTE 0xF6 /* format fill byte. */ |
47 | 42 | ||
48 | int fdformat_main(int argc,char **argv); | 43 | int fdformat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
49 | int fdformat_main(int argc,char **argv) | 44 | int fdformat_main(int argc, char **argv) |
50 | { | 45 | { |
51 | int fd, n, cyl, read_bytes, verify; | 46 | int fd, n, cyl, read_bytes, verify; |
52 | unsigned char *data; | 47 | unsigned char *data; |
@@ -116,7 +111,7 @@ int fdformat_main(int argc,char **argv) | |||
116 | /* Check backwards so we don't need a counter */ | 111 | /* Check backwards so we don't need a counter */ |
117 | while (--read_bytes >= 0) { | 112 | while (--read_bytes >= 0) { |
118 | if (data[read_bytes] != FD_FILL_BYTE) { | 113 | if (data[read_bytes] != FD_FILL_BYTE) { |
119 | printf("bad data in cyl %d\nContinuing... ",cyl); | 114 | printf("bad data in cyl %d\nContinuing... ", cyl); |
120 | } | 115 | } |
121 | } | 116 | } |
122 | } | 117 | } |
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) | |||
2735 | } | 2735 | } |
2736 | #endif | 2736 | #endif |
2737 | 2737 | ||
2738 | int fdisk_main(int argc, char **argv); | 2738 | int fdisk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
2739 | int fdisk_main(int argc, char **argv) | 2739 | int fdisk_main(int argc, char **argv) |
2740 | { | 2740 | { |
2741 | char *str_b, *str_C, *str_H, *str_S; | 2741 | 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 @@ | |||
14 | /* From <linux/fd.h> */ | 14 | /* From <linux/fd.h> */ |
15 | #define FDFLUSH _IO(2,0x4b) | 15 | #define FDFLUSH _IO(2,0x4b) |
16 | 16 | ||
17 | int freeramdisk_main(int argc, char **argv); | 17 | int freeramdisk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
18 | int freeramdisk_main(int argc, char **argv) | 18 | int freeramdisk_main(int argc, char **argv) |
19 | { | 19 | { |
20 | int fd; | 20 | 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) | |||
1249 | void check2(void); | 1249 | void check2(void); |
1250 | #endif | 1250 | #endif |
1251 | 1251 | ||
1252 | int fsck_minix_main(int argc, char **argv); | 1252 | int fsck_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
1253 | int fsck_minix_main(int argc, char **argv) | 1253 | int fsck_minix_main(int argc, char **argv) |
1254 | { | 1254 | { |
1255 | struct termios tmp; | 1255 | 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 = | |||
279 | ; | 279 | ; |
280 | #endif | 280 | #endif |
281 | 281 | ||
282 | int getopt_main(int argc, char *argv[]); | 282 | int getopt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
283 | int getopt_main(int argc, char *argv[]) | 283 | int getopt_main(int argc, char **argv) |
284 | { | 284 | { |
285 | char *optstr = NULL; | 285 | char *optstr = NULL; |
286 | char *name = NULL; | 286 | 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[] = { | |||
54 | { } | 54 | { } |
55 | }; | 55 | }; |
56 | 56 | ||
57 | int hexdump_main(int argc, char **argv); | 57 | int hexdump_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
58 | int hexdump_main(int argc, char **argv) | 58 | int hexdump_main(int argc, char **argv) |
59 | { | 59 | { |
60 | const char *p; | 60 | 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) | |||
171 | #define HWCLOCK_OPT_SYSTOHC 0x10 | 171 | #define HWCLOCK_OPT_SYSTOHC 0x10 |
172 | #define HWCLOCK_OPT_RTCFILE 0x20 | 172 | #define HWCLOCK_OPT_RTCFILE 0x20 |
173 | 173 | ||
174 | int hwclock_main(int argc, char **argv); | 174 | int hwclock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
175 | int hwclock_main(int argc, char **argv) | 175 | int hwclock_main(int argc, char **argv) |
176 | { | 176 | { |
177 | unsigned opt; | 177 | 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) | |||
76 | #endif /* IPCRM_LEGACY */ | 76 | #endif /* IPCRM_LEGACY */ |
77 | 77 | ||
78 | 78 | ||
79 | int ipcrm_main(int argc, char **argv); | 79 | int ipcrm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
80 | int ipcrm_main(int argc, char **argv) | 80 | int ipcrm_main(int argc, char **argv) |
81 | { | 81 | { |
82 | int c; | 82 | 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) | |||
558 | bb_putchar('\n'); | 558 | bb_putchar('\n'); |
559 | } | 559 | } |
560 | 560 | ||
561 | int ipcs_main(int argc, char **argv); | 561 | int ipcs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
562 | int ipcs_main(int argc, char **argv) | 562 | int ipcs_main(int argc, char **argv) |
563 | { | 563 | { |
564 | int id = 0; | 564 | 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 @@ | |||
11 | 11 | ||
12 | #include "libbb.h" | 12 | #include "libbb.h" |
13 | 13 | ||
14 | int losetup_main(int argc, char **argv); | 14 | int losetup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
15 | int losetup_main(int argc, char **argv) | 15 | int losetup_main(int argc, char **argv) |
16 | { | 16 | { |
17 | char dev[] = LOOP_NAME"0"; | 17 | 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 | |||
287 | } | 287 | } |
288 | } | 288 | } |
289 | 289 | ||
290 | int mdev_main(int argc, char **argv); | 290 | int mdev_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
291 | int mdev_main(int argc, char **argv) | 291 | int mdev_main(int argc, char **argv) |
292 | { | 292 | { |
293 | char *action; | 293 | 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) | |||
603 | printf("Maxsize=%ld\n", (long)SB_MAXSIZE); | 603 | printf("Maxsize=%ld\n", (long)SB_MAXSIZE); |
604 | } | 604 | } |
605 | 605 | ||
606 | int mkfs_minix_main(int argc, char **argv); | 606 | int mkfs_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
607 | int mkfs_minix_main(int argc, char **argv) | 607 | int mkfs_minix_main(int argc, char **argv) |
608 | { | 608 | { |
609 | struct mntent *mp; | 609 | 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 @@ | |||
8 | 8 | ||
9 | #include "libbb.h" | 9 | #include "libbb.h" |
10 | 10 | ||
11 | int mkswap_main(int argc, char **argv); | 11 | int mkswap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
12 | int mkswap_main(int argc, char **argv) | 12 | int mkswap_main(int argc, char **argv) |
13 | { | 13 | { |
14 | int fd, pagesize; | 14 | 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) | |||
52 | 52 | ||
53 | #define CONVERTED_TAB_SIZE 8 | 53 | #define CONVERTED_TAB_SIZE 8 |
54 | 54 | ||
55 | int more_main(int argc, char **argv); | 55 | int more_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
56 | int more_main(int argc, char **argv) | 56 | int more_main(int argc, char **argv) |
57 | { | 57 | { |
58 | int c = c; /* for gcc */ | 58 | 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) | |||
1559 | 1559 | ||
1560 | static const char must_be_root[] ALIGN1 = "you must be root"; | 1560 | static const char must_be_root[] ALIGN1 = "you must be root"; |
1561 | 1561 | ||
1562 | int mount_main(int argc, char **argv); | 1562 | int mount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
1563 | int mount_main(int argc, char **argv) | 1563 | int mount_main(int argc, char **argv) |
1564 | { | 1564 | { |
1565 | enum { OPT_ALL = 0x10 }; | 1565 | 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 @@ | |||
12 | 12 | ||
13 | extern int pivot_root(const char * new_root,const char * put_old); | 13 | extern int pivot_root(const char * new_root,const char * put_old); |
14 | 14 | ||
15 | int pivot_root_main(int argc, char **argv); | 15 | int pivot_root_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
16 | int pivot_root_main(int argc, char **argv) | 16 | int pivot_root_main(int argc, char **argv) |
17 | { | 17 | { |
18 | if (argc != 3) | 18 | 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) | |||
42 | return ntohl(nett) - RFC_868_BIAS; | 42 | return ntohl(nett) - RFC_868_BIAS; |
43 | } | 43 | } |
44 | 44 | ||
45 | int rdate_main(int argc, char **argv); | 45 | int rdate_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
46 | int rdate_main(int argc, char **argv) | 46 | int rdate_main(int argc, char **argv) |
47 | { | 47 | { |
48 | time_t remote_time; | 48 | 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 @@ | |||
41 | static const char defaultmap[] ALIGN1 = "/boot/System.map"; | 41 | static const char defaultmap[] ALIGN1 = "/boot/System.map"; |
42 | static const char defaultpro[] ALIGN1 = "/proc/profile"; | 42 | static const char defaultpro[] ALIGN1 = "/proc/profile"; |
43 | 43 | ||
44 | int readprofile_main(int argc, char **argv); | 44 | int readprofile_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
45 | int readprofile_main(int argc, char **argv) | 45 | int readprofile_main(int argc, char **argv) |
46 | { | 46 | { |
47 | FILE *map; | 47 | 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 @@ | |||
11 | 11 | ||
12 | #include "libbb.h" | 12 | #include "libbb.h" |
13 | 13 | ||
14 | int setarch_main(int ATTRIBUTE_UNUSED argc, char **argv); | 14 | int setarch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
15 | int setarch_main(int ATTRIBUTE_UNUSED argc, char **argv) | 15 | int setarch_main(int ATTRIBUTE_UNUSED argc, char **argv) |
16 | { | 16 | { |
17 | int pers = -1; | 17 | 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) | |||
58 | return err; | 58 | return err; |
59 | } | 59 | } |
60 | 60 | ||
61 | int swap_on_off_main(int argc, char **argv); | 61 | int swap_on_off_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
62 | int swap_on_off_main(int argc, char **argv) | 62 | int swap_on_off_main(int argc, char **argv) |
63 | { | 63 | { |
64 | int ret; | 64 | 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) | |||
64 | } else unlink(directory); | 64 | } else unlink(directory); |
65 | } | 65 | } |
66 | 66 | ||
67 | int switch_root_main(int argc, char **argv); | 67 | int switch_root_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
68 | int switch_root_main(int argc, char **argv) | 68 | int switch_root_main(int argc, char **argv) |
69 | { | 69 | { |
70 | char *newroot, *console = NULL; | 70 | 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 @@ | |||
21 | #define OPT_REMOUNT (1 << 4) | 21 | #define OPT_REMOUNT (1 << 4) |
22 | #define OPT_ALL (ENABLE_FEATURE_UMOUNT_ALL ? (1 << 5) : 0) | 22 | #define OPT_ALL (ENABLE_FEATURE_UMOUNT_ALL ? (1 << 5) : 0) |
23 | 23 | ||
24 | int umount_main(int argc, char **argv); | 24 | int umount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
25 | int umount_main(int argc, char **argv) | 25 | int umount_main(int argc, char **argv) |
26 | { | 26 | { |
27 | int doForce; | 27 | int doForce; |