diff options
Diffstat (limited to 'networking/libiproute/ipaddress.c')
-rw-r--r-- | networking/libiproute/ipaddress.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index 8eba90c77..44e871ee5 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c | |||
@@ -125,7 +125,7 @@ static int print_linkinfo(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg | |||
125 | memset(tb, 0, sizeof(tb)); | 125 | memset(tb, 0, sizeof(tb)); |
126 | parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), len); | 126 | parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), len); |
127 | if (tb[IFLA_IFNAME] == NULL) { | 127 | if (tb[IFLA_IFNAME] == NULL) { |
128 | error_msg("nil ifname"); | 128 | bb_error_msg("nil ifname"); |
129 | return -1; | 129 | return -1; |
130 | } | 130 | } |
131 | if (filter.label && | 131 | if (filter.label && |
@@ -217,7 +217,7 @@ static int print_addrinfo(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg | |||
217 | return 0; | 217 | return 0; |
218 | len -= NLMSG_LENGTH(sizeof(*ifa)); | 218 | len -= NLMSG_LENGTH(sizeof(*ifa)); |
219 | if (len < 0) { | 219 | if (len < 0) { |
220 | error_msg("wrong nlmsg len %d", len); | 220 | bb_error_msg("wrong nlmsg len %d", len); |
221 | return -1; | 221 | return -1; |
222 | } | 222 | } |
223 | 223 | ||
@@ -489,17 +489,17 @@ extern int ipaddr_list_or_flush(int argc, char **argv, int flush) | |||
489 | exit(1); | 489 | exit(1); |
490 | 490 | ||
491 | if (rtnl_wilddump_request(&rth, preferred_family, RTM_GETLINK) < 0) { | 491 | if (rtnl_wilddump_request(&rth, preferred_family, RTM_GETLINK) < 0) { |
492 | perror_msg_and_die("Cannot send dump request"); | 492 | bb_perror_msg_and_die("Cannot send dump request"); |
493 | } | 493 | } |
494 | 494 | ||
495 | if (rtnl_dump_filter(&rth, store_nlmsg, &linfo, NULL, NULL) < 0) { | 495 | if (rtnl_dump_filter(&rth, store_nlmsg, &linfo, NULL, NULL) < 0) { |
496 | error_msg_and_die("Dump terminated"); | 496 | bb_error_msg_and_die("Dump terminated"); |
497 | } | 497 | } |
498 | 498 | ||
499 | if (filter_dev) { | 499 | if (filter_dev) { |
500 | filter.ifindex = ll_name_to_index(filter_dev); | 500 | filter.ifindex = ll_name_to_index(filter_dev); |
501 | if (filter.ifindex <= 0) { | 501 | if (filter.ifindex <= 0) { |
502 | error_msg("Device \"%s\" does not exist.", filter_dev); | 502 | bb_error_msg("Device \"%s\" does not exist.", filter_dev); |
503 | return -1; | 503 | return -1; |
504 | } | 504 | } |
505 | } | 505 | } |
@@ -539,11 +539,11 @@ extern int ipaddr_list_or_flush(int argc, char **argv, int flush) | |||
539 | 539 | ||
540 | if (filter.family != AF_PACKET) { | 540 | if (filter.family != AF_PACKET) { |
541 | if (rtnl_wilddump_request(&rth, filter.family, RTM_GETADDR) < 0) { | 541 | if (rtnl_wilddump_request(&rth, filter.family, RTM_GETADDR) < 0) { |
542 | perror_msg_and_die("Cannot send dump request"); | 542 | bb_perror_msg_and_die("Cannot send dump request"); |
543 | } | 543 | } |
544 | 544 | ||
545 | if (rtnl_dump_filter(&rth, store_nlmsg, &ainfo, NULL, NULL) < 0) { | 545 | if (rtnl_dump_filter(&rth, store_nlmsg, &ainfo, NULL, NULL) < 0) { |
546 | error_msg_and_die("Dump terminated"); | 546 | bb_error_msg_and_die("Dump terminated"); |
547 | } | 547 | } |
548 | } | 548 | } |
549 | 549 | ||
@@ -749,11 +749,11 @@ static int ipaddr_modify(int cmd, int argc, char **argv) | |||
749 | } | 749 | } |
750 | 750 | ||
751 | if (d == NULL) { | 751 | if (d == NULL) { |
752 | error_msg("Not enough information: \"dev\" argument is required."); | 752 | bb_error_msg("Not enough information: \"dev\" argument is required."); |
753 | return -1; | 753 | return -1; |
754 | } | 754 | } |
755 | if (l && matches(d, l) != 0) { | 755 | if (l && matches(d, l) != 0) { |
756 | error_msg_and_die("\"dev\" (%s) must match \"label\" (%s).", d, l); | 756 | bb_error_msg_and_die("\"dev\" (%s) must match \"label\" (%s).", d, l); |
757 | } | 757 | } |
758 | 758 | ||
759 | if (peer_len == 0 && local_len && cmd != RTM_DELADDR) { | 759 | if (peer_len == 0 && local_len && cmd != RTM_DELADDR) { |
@@ -767,7 +767,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv) | |||
767 | inet_prefix brd; | 767 | inet_prefix brd; |
768 | int i; | 768 | int i; |
769 | if (req.ifa.ifa_family != AF_INET) { | 769 | if (req.ifa.ifa_family != AF_INET) { |
770 | error_msg("Broadcast can be set only for IPv4 addresses"); | 770 | bb_error_msg("Broadcast can be set only for IPv4 addresses"); |
771 | return -1; | 771 | return -1; |
772 | } | 772 | } |
773 | brd = peer; | 773 | brd = peer; |
@@ -791,7 +791,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv) | |||
791 | ll_init_map(&rth); | 791 | ll_init_map(&rth); |
792 | 792 | ||
793 | if ((req.ifa.ifa_index = ll_name_to_index(d)) == 0) { | 793 | if ((req.ifa.ifa_index = ll_name_to_index(d)) == 0) { |
794 | error_msg("Cannot find device \"%s\"", d); | 794 | bb_error_msg("Cannot find device \"%s\"", d); |
795 | return -1; | 795 | return -1; |
796 | } | 796 | } |
797 | 797 | ||
@@ -821,5 +821,5 @@ extern int do_ipaddr(int argc, char **argv) | |||
821 | case 5: /* flush */ | 821 | case 5: /* flush */ |
822 | return ipaddr_list_or_flush(argc-1, argv+1, 1); | 822 | return ipaddr_list_or_flush(argc-1, argv+1, 1); |
823 | } | 823 | } |
824 | error_msg_and_die("Unknown command %s", *argv); | 824 | bb_error_msg_and_die("Unknown command %s", *argv); |
825 | } | 825 | } |