diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-26 00:37:00 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-26 00:37:00 +0000 |
commit | c6f188def8c5496dbd65c9be6ca3050286db7227 (patch) | |
tree | d8e1e56c728628c15f66cb88a6e54f368c806939 /networking/libiproute/iproute.c | |
parent | e63a0dee9e559110bcaec494ae5e7fc78c4141c7 (diff) | |
download | busybox-w32-c6f188def8c5496dbd65c9be6ca3050286db7227.tar.gz busybox-w32-c6f188def8c5496dbd65c9be6ca3050286db7227.tar.bz2 busybox-w32-c6f188def8c5496dbd65c9be6ca3050286db7227.zip |
silly size savings and capitalization fixes
Diffstat (limited to 'networking/libiproute/iproute.c')
-rw-r--r-- | networking/libiproute/iproute.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 6c902eb0e..077c9190e 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) | |||
398 | 398 | ||
399 | if (d) { | 399 | if (d) { |
400 | if ((idx = ll_name_to_index(d)) == 0) { | 400 | if ((idx = ll_name_to_index(d)) == 0) { |
401 | bb_error_msg("Cannot find device \"%s\"", d); | 401 | bb_error_msg("cannot find device \"%s\"", d); |
402 | return -1; | 402 | return -1; |
403 | } | 403 | } |
404 | addattr32(&req.n, sizeof(req), RTA_OIF, idx); | 404 | addattr32(&req.n, sizeof(req), RTA_OIF, idx); |
@@ -571,7 +571,7 @@ static int iproute_list_or_flush(int argc, char **argv, int flush) | |||
571 | 571 | ||
572 | if (id) { | 572 | if (id) { |
573 | if ((idx = ll_name_to_index(id)) == 0) { | 573 | if ((idx = ll_name_to_index(id)) == 0) { |
574 | bb_error_msg("Cannot find device \"%s\"", id); | 574 | bb_error_msg("cannot find device \"%s\"", id); |
575 | return -1; | 575 | return -1; |
576 | } | 576 | } |
577 | filter.iif = idx; | 577 | filter.iif = idx; |
@@ -579,7 +579,7 @@ static int iproute_list_or_flush(int argc, char **argv, int flush) | |||
579 | } | 579 | } |
580 | if (od) { | 580 | if (od) { |
581 | if ((idx = ll_name_to_index(od)) == 0) { | 581 | if ((idx = ll_name_to_index(od)) == 0) { |
582 | bb_error_msg("Cannot find device \"%s\"", od); | 582 | bb_error_msg("cannot find device \"%s\"", od); |
583 | } | 583 | } |
584 | filter.oif = idx; | 584 | filter.oif = idx; |
585 | filter.oifmask = -1; | 585 | filter.oifmask = -1; |
@@ -608,7 +608,7 @@ static int iproute_list_or_flush(int argc, char **argv, int flush) | |||
608 | } | 608 | } |
609 | filter.flushed = 0; | 609 | filter.flushed = 0; |
610 | if (rtnl_dump_filter(&rth, print_route, stdout, NULL, NULL) < 0) { | 610 | if (rtnl_dump_filter(&rth, print_route, stdout, NULL, NULL) < 0) { |
611 | bb_error_msg("Flush terminated"); | 611 | bb_error_msg("flush terminated"); |
612 | return -1; | 612 | return -1; |
613 | } | 613 | } |
614 | if (filter.flushed == 0) { | 614 | if (filter.flushed == 0) { |
@@ -622,16 +622,16 @@ static int iproute_list_or_flush(int argc, char **argv, int flush) | |||
622 | 622 | ||
623 | if (filter.tb != -1) { | 623 | if (filter.tb != -1) { |
624 | if (rtnl_wilddump_request(&rth, do_ipv6, RTM_GETROUTE) < 0) { | 624 | if (rtnl_wilddump_request(&rth, do_ipv6, RTM_GETROUTE) < 0) { |
625 | bb_perror_msg_and_die("Cannot send dump request"); | 625 | bb_perror_msg_and_die("cannot send dump request"); |
626 | } | 626 | } |
627 | } else { | 627 | } else { |
628 | if (rtnl_rtcache_request(&rth, do_ipv6) < 0) { | 628 | if (rtnl_rtcache_request(&rth, do_ipv6) < 0) { |
629 | bb_perror_msg_and_die("Cannot send dump request"); | 629 | bb_perror_msg_and_die("cannot send dump request"); |
630 | } | 630 | } |
631 | } | 631 | } |
632 | 632 | ||
633 | if (rtnl_dump_filter(&rth, print_route, stdout, NULL, NULL) < 0) { | 633 | if (rtnl_dump_filter(&rth, print_route, stdout, NULL, NULL) < 0) { |
634 | bb_error_msg_and_die("Dump terminated"); | 634 | bb_error_msg_and_die("dump terminated"); |
635 | } | 635 | } |
636 | 636 | ||
637 | exit(0); | 637 | exit(0); |
@@ -733,14 +733,14 @@ static int iproute_get(int argc, char **argv) | |||
733 | 733 | ||
734 | if (idev) { | 734 | if (idev) { |
735 | if ((idx = ll_name_to_index(idev)) == 0) { | 735 | if ((idx = ll_name_to_index(idev)) == 0) { |
736 | bb_error_msg("Cannot find device \"%s\"", idev); | 736 | bb_error_msg("cannot find device \"%s\"", idev); |
737 | return -1; | 737 | return -1; |
738 | } | 738 | } |
739 | addattr32(&req.n, sizeof(req), RTA_IIF, idx); | 739 | addattr32(&req.n, sizeof(req), RTA_IIF, idx); |
740 | } | 740 | } |
741 | if (odev) { | 741 | if (odev) { |
742 | if ((idx = ll_name_to_index(odev)) == 0) { | 742 | if ((idx = ll_name_to_index(odev)) == 0) { |
743 | bb_error_msg("Cannot find device \"%s\"", odev); | 743 | bb_error_msg("cannot find device \"%s\"", odev); |
744 | return -1; | 744 | return -1; |
745 | } | 745 | } |
746 | addattr32(&req.n, sizeof(req), RTA_OIF, idx); | 746 | addattr32(&req.n, sizeof(req), RTA_OIF, idx); |
@@ -761,16 +761,16 @@ static int iproute_get(int argc, char **argv) | |||
761 | struct rtattr * tb[RTA_MAX+1]; | 761 | struct rtattr * tb[RTA_MAX+1]; |
762 | 762 | ||
763 | if (print_route(NULL, &req.n, (void*)stdout) < 0) { | 763 | if (print_route(NULL, &req.n, (void*)stdout) < 0) { |
764 | bb_error_msg_and_die("An error :-)"); | 764 | bb_error_msg_and_die("an error :-)"); |
765 | } | 765 | } |
766 | 766 | ||
767 | if (req.n.nlmsg_type != RTM_NEWROUTE) { | 767 | if (req.n.nlmsg_type != RTM_NEWROUTE) { |
768 | bb_error_msg("Not a route?"); | 768 | bb_error_msg("not a route?"); |
769 | return -1; | 769 | return -1; |
770 | } | 770 | } |
771 | len -= NLMSG_LENGTH(sizeof(*r)); | 771 | len -= NLMSG_LENGTH(sizeof(*r)); |
772 | if (len < 0) { | 772 | if (len < 0) { |
773 | bb_error_msg("Wrong len %d", len); | 773 | bb_error_msg("wrong len %d", len); |
774 | return -1; | 774 | return -1; |
775 | } | 775 | } |
776 | 776 | ||
@@ -781,7 +781,7 @@ static int iproute_get(int argc, char **argv) | |||
781 | tb[RTA_PREFSRC]->rta_type = RTA_SRC; | 781 | tb[RTA_PREFSRC]->rta_type = RTA_SRC; |
782 | r->rtm_src_len = 8*RTA_PAYLOAD(tb[RTA_PREFSRC]); | 782 | r->rtm_src_len = 8*RTA_PAYLOAD(tb[RTA_PREFSRC]); |
783 | } else if (!tb[RTA_SRC]) { | 783 | } else if (!tb[RTA_SRC]) { |
784 | bb_error_msg("Failed to connect the route"); | 784 | bb_error_msg("failed to connect the route"); |
785 | return -1; | 785 | return -1; |
786 | } | 786 | } |
787 | if (!odev && tb[RTA_OIF]) { | 787 | if (!odev && tb[RTA_OIF]) { |
@@ -802,7 +802,7 @@ static int iproute_get(int argc, char **argv) | |||
802 | } | 802 | } |
803 | 803 | ||
804 | if (print_route(NULL, &req.n, (void*)stdout) < 0) { | 804 | if (print_route(NULL, &req.n, (void*)stdout) < 0) { |
805 | bb_error_msg_and_die("An error :-)"); | 805 | bb_error_msg_and_die("an error :-)"); |
806 | } | 806 | } |
807 | 807 | ||
808 | exit(0); | 808 | exit(0); |
@@ -849,7 +849,7 @@ int do_iproute(int argc, char **argv) | |||
849 | case 12: /* flush */ | 849 | case 12: /* flush */ |
850 | return iproute_list_or_flush(argc-1, argv+1, 1); | 850 | return iproute_list_or_flush(argc-1, argv+1, 1); |
851 | default: | 851 | default: |
852 | bb_error_msg_and_die("Unknown command %s", *argv); | 852 | bb_error_msg_and_die("unknown command %s", *argv); |
853 | } | 853 | } |
854 | 854 | ||
855 | return iproute_modify(cmd, flags, argc-1, argv+1); | 855 | return iproute_modify(cmd, flags, argc-1, argv+1); |