From c6f188def8c5496dbd65c9be6ca3050286db7227 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 26 Oct 2006 00:37:00 +0000 Subject: silly size savings and capitalization fixes --- networking/libiproute/ipaddress.c | 16 ++++++++-------- networking/libiproute/iproute.c | 30 +++++++++++++++--------------- networking/libiproute/iptunnel.c | 22 +++++++++++----------- 3 files changed, 34 insertions(+), 34 deletions(-) (limited to 'networking/libiproute') diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index 262d3e3..35fd099 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c @@ -435,7 +435,7 @@ int ipaddr_list_or_flush(int argc, char **argv, int flush) return -1; } if (filter.family == AF_PACKET) { - bb_error_msg("Cannot flush link addresses."); + bb_error_msg("cannot flush link addresses"); return -1; } } @@ -488,17 +488,17 @@ int ipaddr_list_or_flush(int argc, char **argv, int flush) exit(1); if (rtnl_wilddump_request(&rth, preferred_family, RTM_GETLINK) < 0) { - bb_perror_msg_and_die("Cannot send dump request"); + bb_perror_msg_and_die("cannot send dump request"); } if (rtnl_dump_filter(&rth, store_nlmsg, &linfo, NULL, NULL) < 0) { - bb_error_msg_and_die("Dump terminated"); + bb_error_msg_and_die("dump terminated"); } if (filter_dev) { filter.ifindex = ll_name_to_index(filter_dev); if (filter.ifindex <= 0) { - bb_error_msg("Device \"%s\" does not exist", filter_dev); + bb_error_msg("device \"%s\" does not exist", filter_dev); return -1; } } @@ -532,11 +532,11 @@ int ipaddr_list_or_flush(int argc, char **argv, int flush) if (filter.family != AF_PACKET) { if (rtnl_wilddump_request(&rth, filter.family, RTM_GETADDR) < 0) { - bb_perror_msg_and_die("Cannot send dump request"); + bb_perror_msg_and_die("cannot send dump request"); } if (rtnl_dump_filter(&rth, store_nlmsg, &ainfo, NULL, NULL) < 0) { - bb_error_msg_and_die("Dump terminated"); + bb_error_msg_and_die("dump terminated"); } } @@ -763,7 +763,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv) inet_prefix brd; int i; if (req.ifa.ifa_family != AF_INET) { - bb_error_msg("Broadcast can be set only for IPv4 addresses"); + bb_error_msg("broadcast can be set only for IPv4 addresses"); return -1; } brd = peer; @@ -787,7 +787,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv) ll_init_map(&rth); if ((req.ifa.ifa_index = ll_name_to_index(d)) == 0) { - bb_error_msg("Cannot find device \"%s\"", d); + bb_error_msg("cannot find device \"%s\"", d); return -1; } diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 6c902eb..077c919 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c @@ -398,7 +398,7 @@ static int iproute_modify(int cmd, unsigned flags, int argc, char **argv) if (d) { if ((idx = ll_name_to_index(d)) == 0) { - bb_error_msg("Cannot find device \"%s\"", d); + bb_error_msg("cannot find device \"%s\"", d); return -1; } addattr32(&req.n, sizeof(req), RTA_OIF, idx); @@ -571,7 +571,7 @@ static int iproute_list_or_flush(int argc, char **argv, int flush) if (id) { if ((idx = ll_name_to_index(id)) == 0) { - bb_error_msg("Cannot find device \"%s\"", id); + bb_error_msg("cannot find device \"%s\"", id); return -1; } filter.iif = idx; @@ -579,7 +579,7 @@ static int iproute_list_or_flush(int argc, char **argv, int flush) } if (od) { if ((idx = ll_name_to_index(od)) == 0) { - bb_error_msg("Cannot find device \"%s\"", od); + bb_error_msg("cannot find device \"%s\"", od); } filter.oif = idx; filter.oifmask = -1; @@ -608,7 +608,7 @@ static int iproute_list_or_flush(int argc, char **argv, int flush) } filter.flushed = 0; if (rtnl_dump_filter(&rth, print_route, stdout, NULL, NULL) < 0) { - bb_error_msg("Flush terminated"); + bb_error_msg("flush terminated"); return -1; } if (filter.flushed == 0) { @@ -622,16 +622,16 @@ static int iproute_list_or_flush(int argc, char **argv, int flush) if (filter.tb != -1) { if (rtnl_wilddump_request(&rth, do_ipv6, RTM_GETROUTE) < 0) { - bb_perror_msg_and_die("Cannot send dump request"); + bb_perror_msg_and_die("cannot send dump request"); } } else { if (rtnl_rtcache_request(&rth, do_ipv6) < 0) { - bb_perror_msg_and_die("Cannot send dump request"); + bb_perror_msg_and_die("cannot send dump request"); } } if (rtnl_dump_filter(&rth, print_route, stdout, NULL, NULL) < 0) { - bb_error_msg_and_die("Dump terminated"); + bb_error_msg_and_die("dump terminated"); } exit(0); @@ -733,14 +733,14 @@ static int iproute_get(int argc, char **argv) if (idev) { if ((idx = ll_name_to_index(idev)) == 0) { - bb_error_msg("Cannot find device \"%s\"", idev); + bb_error_msg("cannot find device \"%s\"", idev); return -1; } addattr32(&req.n, sizeof(req), RTA_IIF, idx); } if (odev) { if ((idx = ll_name_to_index(odev)) == 0) { - bb_error_msg("Cannot find device \"%s\"", odev); + bb_error_msg("cannot find device \"%s\"", odev); return -1; } addattr32(&req.n, sizeof(req), RTA_OIF, idx); @@ -761,16 +761,16 @@ static int iproute_get(int argc, char **argv) struct rtattr * tb[RTA_MAX+1]; if (print_route(NULL, &req.n, (void*)stdout) < 0) { - bb_error_msg_and_die("An error :-)"); + bb_error_msg_and_die("an error :-)"); } if (req.n.nlmsg_type != RTM_NEWROUTE) { - bb_error_msg("Not a route?"); + bb_error_msg("not a route?"); return -1; } len -= NLMSG_LENGTH(sizeof(*r)); if (len < 0) { - bb_error_msg("Wrong len %d", len); + bb_error_msg("wrong len %d", len); return -1; } @@ -781,7 +781,7 @@ static int iproute_get(int argc, char **argv) tb[RTA_PREFSRC]->rta_type = RTA_SRC; r->rtm_src_len = 8*RTA_PAYLOAD(tb[RTA_PREFSRC]); } else if (!tb[RTA_SRC]) { - bb_error_msg("Failed to connect the route"); + bb_error_msg("failed to connect the route"); return -1; } if (!odev && tb[RTA_OIF]) { @@ -802,7 +802,7 @@ static int iproute_get(int argc, char **argv) } if (print_route(NULL, &req.n, (void*)stdout) < 0) { - bb_error_msg_and_die("An error :-)"); + bb_error_msg_and_die("an error :-)"); } exit(0); @@ -849,7 +849,7 @@ int do_iproute(int argc, char **argv) case 12: /* flush */ return iproute_list_or_flush(argc-1, argv+1, 1); default: - bb_error_msg_and_die("Unknown command %s", *argv); + bb_error_msg_and_die("unknown command %s", *argv); } return iproute_modify(cmd, flags, argc-1, argv+1); diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c index 806d865..2b9d305 100644 --- a/networking/libiproute/iptunnel.c +++ b/networking/libiproute/iptunnel.c @@ -164,26 +164,26 @@ static int parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p) if (strcmp(*argv, "ipip") == 0 || strcmp(*argv, "ip/ip") == 0) { if (p->iph.protocol && p->iph.protocol != IPPROTO_IPIP) { - bb_error_msg("You managed to ask for more than one tunnel mode."); + bb_error_msg("you managed to ask for more than one tunnel mode"); exit(-1); } p->iph.protocol = IPPROTO_IPIP; } else if (strcmp(*argv, "gre") == 0 || strcmp(*argv, "gre/ip") == 0) { if (p->iph.protocol && p->iph.protocol != IPPROTO_GRE) { - bb_error_msg("You managed to ask for more than one tunnel mode."); + bb_error_msg("you managed to ask for more than one tunnel mode"); exit(-1); } p->iph.protocol = IPPROTO_GRE; } else if (strcmp(*argv, "sit") == 0 || strcmp(*argv, "ipv6/ip") == 0) { if (p->iph.protocol && p->iph.protocol != IPPROTO_IPV6) { - bb_error_msg("You managed to ask for more than one tunnel mode."); + bb_error_msg("you managed to ask for more than one tunnel mode"); exit(-1); } p->iph.protocol = IPPROTO_IPV6; } else { - bb_error_msg("Cannot guess tunnel mode."); + bb_error_msg("cannot guess tunnel mode"); exit(-1); } } else if (strcmp(*argv, "key") == 0) { @@ -306,7 +306,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p) if (p->iph.protocol == IPPROTO_IPIP || p->iph.protocol == IPPROTO_IPV6) { if ((p->i_flags & GRE_KEY) || (p->o_flags & GRE_KEY)) { - bb_error_msg("Keys are not allowed with ipip and sit."); + bb_error_msg("keys are not allowed with ipip and sit"); return -1; } } @@ -326,7 +326,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p) p->o_flags |= GRE_KEY; } if (IN_MULTICAST(ntohl(p->iph.daddr)) && !p->iph.saddr) { - bb_error_msg("Broadcast tunnel requires a source address."); + bb_error_msg("broadcast tunnel requires a source address"); return -1; } return 0; @@ -462,7 +462,7 @@ static int do_tunnels_list(struct ip_tunnel_parm *p) buf[sizeof(buf) - 1] = 0; if ((ptr = strchr(buf, ':')) == NULL || (*ptr++ = 0, sscanf(buf, "%s", name) != 1)) { - bb_error_msg("Wrong format of /proc/net/dev. Sorry."); + bb_error_msg("wrong format of /proc/net/dev. Sorry"); return -1; } if (sscanf(ptr, "%lu%lu%lu%lu%lu%lu%lu%*d%lu%lu%lu%lu%lu%lu%lu", @@ -475,7 +475,7 @@ static int do_tunnels_list(struct ip_tunnel_parm *p) continue; type = do_ioctl_get_iftype(name); if (type == -1) { - bb_error_msg("Failed to get type of [%s]", name); + bb_error_msg("failed to get type of [%s]", name); continue; } if (type != ARPHRD_TUNNEL && type != ARPHRD_IPGRE && type != ARPHRD_SIT) @@ -490,7 +490,7 @@ static int do_tunnels_list(struct ip_tunnel_parm *p) (p->i_key && p1.i_key != p->i_key)) continue; print_tunnel(&p1); - printf("\n"); + puts(""); } return 0; } @@ -521,7 +521,7 @@ static int do_show(int argc, char **argv) return -1; print_tunnel(&p); - printf("\n"); + puts(""); return 0; } @@ -541,6 +541,6 @@ int do_iptunnel(int argc, char **argv) } else return do_show(0, NULL); - bb_error_msg("Command \"%s\" is unknown.", *argv); + bb_error_msg("command \"%s\" is unknown", *argv); exit(-1); } -- cgit v1.1