summaryrefslogtreecommitdiff
path: root/networking/libiproute
diff options
context:
space:
mode:
authorDenys Vlasenko2010-07-24 23:27:38 +0200
committerDenys Vlasenko2010-07-24 23:27:38 +0200
commit2e9b5510d687e5418bea85c3b04ad1e1fa797b6f (patch)
tree426a864b37e091349a569e1f822ea084121ed04a /networking/libiproute
parente0a622093c6c1f3e3a1f58713118395994000fd9 (diff)
downloadbusybox-2e9b5510d687e5418bea85c3b04ad1e1fa797b6f.zip
busybox-2e9b5510d687e5418bea85c3b04ad1e1fa797b6f.tar.gz
libiproute: code shrink by adding FAST_FUNC
function old new delta ipaddr_list_or_flush 1282 1293 +11 ip_parse_common_args 153 151 -2 ip_main 53 50 -3 ip_do 19 15 -4 do_iptunnel 985 980 -5 do_iprule 982 977 -5 do_iplink 1637 1631 -6 do_iproute 2105 2098 -7 do_ipaddr 1406 1398 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/8 up/down: 11/-40) Total: -29 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/libiproute')
-rw-r--r--networking/libiproute/ip_common.h29
-rw-r--r--networking/libiproute/ip_parse_common_args.c2
-rw-r--r--networking/libiproute/ipaddress.c4
-rw-r--r--networking/libiproute/iplink.c2
-rw-r--r--networking/libiproute/iproute.c2
-rw-r--r--networking/libiproute/iprule.c2
-rw-r--r--networking/libiproute/iptunnel.c2
7 files changed, 21 insertions, 22 deletions
diff --git a/networking/libiproute/ip_common.h b/networking/libiproute/ip_common.h
index aef3252..30c7e59 100644
--- a/networking/libiproute/ip_common.h
+++ b/networking/libiproute/ip_common.h
@@ -15,22 +15,21 @@
PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
-extern char **ip_parse_common_args(char **argv);
-extern int print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg);
-extern int ipaddr_list_or_flush(char **argv, int flush);
-extern int iproute_monitor(char **argv);
-extern void iplink_usage(void) NORETURN;
-extern void ipneigh_reset_filter(void);
+char FAST_FUNC **ip_parse_common_args(char **argv);
+//int FAST_FUNC print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg);
+int FAST_FUNC ipaddr_list_or_flush(char **argv, int flush);
+//int FAST_FUNC iproute_monitor(char **argv);
+//void FAST_FUNC ipneigh_reset_filter(void);
-extern int do_ipaddr(char **argv);
-extern int do_iproute(char **argv);
-extern int do_iprule(char **argv);
-extern int do_ipneigh(char **argv);
-extern int do_iptunnel(char **argv);
-extern int do_iplink(char **argv);
-extern int do_ipmonitor(char **argv);
-extern int do_multiaddr(char **argv);
-extern int do_multiroute(char **argv);
+int FAST_FUNC do_ipaddr(char **argv);
+int FAST_FUNC do_iproute(char **argv);
+int FAST_FUNC do_iprule(char **argv);
+//int FAST_FUNC do_ipneigh(char **argv);
+int FAST_FUNC do_iptunnel(char **argv);
+int FAST_FUNC do_iplink(char **argv);
+//int FAST_FUNC do_ipmonitor(char **argv);
+//int FAST_FUNC do_multiaddr(char **argv);
+//int FAST_FUNC do_multiroute(char **argv);
POP_SAVED_FUNCTION_VISIBILITY
diff --git a/networking/libiproute/ip_parse_common_args.c b/networking/libiproute/ip_parse_common_args.c
index 5e4012b..bf01528 100644
--- a/networking/libiproute/ip_parse_common_args.c
+++ b/networking/libiproute/ip_parse_common_args.c
@@ -22,7 +22,7 @@ family_t preferred_family = AF_UNSPEC;
smallint oneline;
char _SL_;
-char **ip_parse_common_args(char **argv)
+char** FAST_FUNC ip_parse_common_args(char **argv)
{
static const char ip_common_commands[] ALIGN1 =
"oneline" "\0"
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index 3812934..b6f469d 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -415,7 +415,7 @@ static void ipaddr_reset_filter(int _oneline)
}
/* Return value becomes exitcode. It's okay to not return at all */
-int ipaddr_list_or_flush(char **argv, int flush)
+int FAST_FUNC ipaddr_list_or_flush(char **argv, int flush)
{
static const char option[] ALIGN1 = "to\0""scope\0""up\0""label\0""dev\0";
@@ -747,7 +747,7 @@ static int ipaddr_modify(int cmd, char **argv)
}
/* Return value becomes exitcode. It's okay to not return at all */
-int do_ipaddr(char **argv)
+int FAST_FUNC do_ipaddr(char **argv)
{
static const char commands[] ALIGN1 =
"add\0""delete\0""list\0""show\0""lst\0""flush\0";
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c
index 8bf8927..9f92185 100644
--- a/networking/libiproute/iplink.c
+++ b/networking/libiproute/iplink.c
@@ -362,7 +362,7 @@ static int do_change(char **argv, const unsigned rtm)
}
/* Return value becomes exitcode. It's okay to not return at all */
-int do_iplink(char **argv)
+int FAST_FUNC do_iplink(char **argv)
{
static const char keywords[] ALIGN1 =
"add\0""delete\0""set\0""show\0""lst\0""list\0";
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
index d771a60..8dba2bf 100644
--- a/networking/libiproute/iproute.c
+++ b/networking/libiproute/iproute.c
@@ -869,7 +869,7 @@ static int iproute_get(char **argv)
}
/* Return value becomes exitcode. It's okay to not return at all */
-int do_iproute(char **argv)
+int FAST_FUNC do_iproute(char **argv)
{
static const char ip_route_commands[] ALIGN1 =
/*0-3*/ "add\0""append\0""change\0""chg\0"
diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c
index 835529e..3af6a83 100644
--- a/networking/libiproute/iprule.c
+++ b/networking/libiproute/iprule.c
@@ -304,7 +304,7 @@ static int iprule_modify(int cmd, char **argv)
}
/* Return value becomes exitcode. It's okay to not return at all */
-int do_iprule(char **argv)
+int FAST_FUNC do_iprule(char **argv)
{
static const char ip_rule_commands[] ALIGN1 =
"add\0""delete\0""list\0""show\0";
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c
index 2573438..8389ef3 100644
--- a/networking/libiproute/iptunnel.c
+++ b/networking/libiproute/iptunnel.c
@@ -556,7 +556,7 @@ static int do_show(char **argv)
}
/* Return value becomes exitcode. It's okay to not return at all */
-int do_iptunnel(char **argv)
+int FAST_FUNC do_iptunnel(char **argv)
{
static const char keywords[] ALIGN1 =
"add\0""change\0""delete\0""show\0""list\0""lst\0";