aboutsummaryrefslogtreecommitdiff
path: root/libbb/interface.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
commitcad5364599eb5062d59e0c397ed638ddd61a8d5d (patch)
treea318d0f03aa076c74b576ea45dc543a5669e8e91 /libbb/interface.c
parente01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff)
downloadbusybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz
busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.bz2
busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.zip
Major coreutils update.
Diffstat (limited to 'libbb/interface.c')
-rw-r--r--libbb/interface.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libbb/interface.c b/libbb/interface.c
index fb794169d..531700f45 100644
--- a/libbb/interface.c
+++ b/libbb/interface.c
@@ -15,7 +15,7 @@
15 * that either displays or sets the characteristics of 15 * that either displays or sets the characteristics of
16 * one or more of the system's networking interfaces. 16 * one or more of the system's networking interfaces.
17 * 17 *
18 * Version: $Id: interface.c,v 1.14 2003/02/09 22:40:33 bug1 Exp $ 18 * Version: $Id: interface.c,v 1.15 2003/03/19 09:12:07 mjn3 Exp $
19 * 19 *
20 * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> 20 * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
21 * and others. Copyright 1993 MicroWalt Corporation 21 * and others. Copyright 1993 MicroWalt Corporation
@@ -619,7 +619,7 @@ static int aftrans_opt(const char *arg)
619 if (strcmp(tmp1, paft->alias)) 619 if (strcmp(tmp1, paft->alias))
620 continue; 620 continue;
621 if (strlen(paft->name) + strlen(afname) + 1 >= sizeof(afname)) { 621 if (strlen(paft->name) + strlen(afname) + 1 >= sizeof(afname)) {
622 error_msg(_("Too many address family arguments.")); 622 bb_error_msg(_("Too many address family arguments."));
623 return (0); 623 return (0);
624 } 624 }
625 if (paft->flag) 625 if (paft->flag)
@@ -630,7 +630,7 @@ static int aftrans_opt(const char *arg)
630 break; 630 break;
631 } 631 }
632 if (!paft->alias) { 632 if (!paft->alias) {
633 error_msg(_("Unknown address family `%s'."), tmp1); 633 bb_error_msg(_("Unknown address family `%s'."), tmp1);
634 return (1); 634 return (1);
635 } 635 }
636 tmp1 = tmp2; 636 tmp1 = tmp2;
@@ -693,7 +693,7 @@ static struct aftype *get_aftype(const char *name)
693 afp++; 693 afp++;
694 } 694 }
695 if (strchr(name, ',')) 695 if (strchr(name, ','))
696 error_msg(_("Please don't supply more than one address family.")); 696 bb_error_msg(_("Please don't supply more than one address family."));
697 return (NULL); 697 return (NULL);
698} 698}
699#endif /* KEEP_UNUSED */ 699#endif /* KEEP_UNUSED */
@@ -888,7 +888,7 @@ static int sockets_open(int family)
888 sfd = af->fd; 888 sfd = af->fd;
889 } 889 }
890 if (sfd < 0) { 890 if (sfd < 0) {
891 error_msg(_("No usable address families found.")); 891 bb_error_msg(_("No usable address families found."));
892 } 892 }
893 return sfd; 893 return sfd;
894} 894}
@@ -960,7 +960,7 @@ static int if_readconf(void)
960 (as of 2.1.128) */ 960 (as of 2.1.128) */
961 skfd2 = get_socket_for_af(AF_INET); 961 skfd2 = get_socket_for_af(AF_INET);
962 if (skfd2 < 0) { 962 if (skfd2 < 0) {
963 perror_msg(("warning: no inet socket available")); 963 bb_perror_msg(("warning: no inet socket available"));
964 /* Try to soldier on with whatever socket we can get hold of. */ 964 /* Try to soldier on with whatever socket we can get hold of. */
965 skfd2 = sockets_open(0); 965 skfd2 = sockets_open(0);
966 if (skfd2 < 0) 966 if (skfd2 < 0)
@@ -1106,7 +1106,7 @@ static int if_readlist_proc(char *target)
1106 1106
1107 fh = fopen(_PATH_PROCNET_DEV, "r"); 1107 fh = fopen(_PATH_PROCNET_DEV, "r");
1108 if (!fh) { 1108 if (!fh) {
1109 perror_msg(_("Warning: cannot open %s. Limited output."), _PATH_PROCNET_DEV); 1109 bb_perror_msg(_("Warning: cannot open %s. Limited output."), _PATH_PROCNET_DEV);
1110 return if_readconf(); 1110 return if_readconf();
1111 } 1111 }
1112 fgets(buf, sizeof buf, fh); /* eat line */ 1112 fgets(buf, sizeof buf, fh); /* eat line */
@@ -1366,7 +1366,7 @@ static int do_if_fetch(struct interface *ife)
1366 } else { 1366 } else {
1367 errmsg = strerror(errno); 1367 errmsg = strerror(errno);
1368 } 1368 }
1369 error_msg(_("%s: error fetching interface information: %s\n"), 1369 bb_error_msg(_("%s: error fetching interface information: %s\n"),
1370 ife->name, errmsg); 1370 ife->name, errmsg);
1371 return -1; 1371 return -1;
1372 } 1372 }
@@ -1441,7 +1441,7 @@ static int in_ether(char *bufp, struct sockaddr *sap)
1441 val = c - 'A' + 10; 1441 val = c - 'A' + 10;
1442 else { 1442 else {
1443#ifdef DEBUG 1443#ifdef DEBUG
1444 error_msg(_("in_ether(%s): invalid ether address!\n"), orig); 1444 bb_error_msg(_("in_ether(%s): invalid ether address!\n"), orig);
1445#endif 1445#endif
1446 errno = EINVAL; 1446 errno = EINVAL;
1447 return (-1); 1447 return (-1);
@@ -1458,7 +1458,7 @@ static int in_ether(char *bufp, struct sockaddr *sap)
1458 val >>= 4; 1458 val >>= 4;
1459 else { 1459 else {
1460#ifdef DEBUG 1460#ifdef DEBUG
1461 error_msg(_("in_ether(%s): invalid ether address!"), orig); 1461 bb_error_msg(_("in_ether(%s): invalid ether address!"), orig);
1462#endif 1462#endif
1463 errno = EINVAL; 1463 errno = EINVAL;
1464 return (-1); 1464 return (-1);
@@ -1472,7 +1472,7 @@ static int in_ether(char *bufp, struct sockaddr *sap)
1472 if (*bufp == ':') { 1472 if (*bufp == ':') {
1473#ifdef DEBUG 1473#ifdef DEBUG
1474 if (i == ETH_ALEN) { 1474 if (i == ETH_ALEN) {
1475 error_msg(_("in_ether(%s): trailing : ignored!"), orig); 1475 bb_error_msg(_("in_ether(%s): trailing : ignored!"), orig);
1476 } 1476 }
1477#endif 1477#endif
1478 bufp++; 1478 bufp++;
@@ -1482,11 +1482,11 @@ static int in_ether(char *bufp, struct sockaddr *sap)
1482#ifdef DEBUG 1482#ifdef DEBUG
1483 /* That's it. Any trailing junk? */ 1483 /* That's it. Any trailing junk? */
1484 if ((i == ETH_ALEN) && (*bufp != '\0')) { 1484 if ((i == ETH_ALEN) && (*bufp != '\0')) {
1485 error_msg(_("in_ether(%s): trailing junk!"), orig); 1485 bb_error_msg(_("in_ether(%s): trailing junk!"), orig);
1486 errno = EINVAL; 1486 errno = EINVAL;
1487 return (-1); 1487 return (-1);
1488 } 1488 }
1489 error_msg("in_ether(%s): %s", orig, pr_ether(sap->sa_data)); 1489 bb_error_msg("in_ether(%s): %s", orig, pr_ether(sap->sa_data));
1490#endif 1490#endif
1491 1491
1492 return (0); 1492 return (0);
@@ -1511,7 +1511,7 @@ static struct hwtype ether_hwtype = {
1511/* Start the PPP encapsulation on the file descriptor. */ 1511/* Start the PPP encapsulation on the file descriptor. */
1512static int do_ppp(int fd) 1512static int do_ppp(int fd)
1513{ 1513{
1514 error_msg(_("You cannot start PPP with this program.")); 1514 bb_error_msg(_("You cannot start PPP with this program."));
1515 return -1; 1515 return -1;
1516} 1516}
1517#endif /* KEEP_UNUSED */ 1517#endif /* KEEP_UNUSED */
@@ -2052,7 +2052,7 @@ int display_interfaces(char *ifname)
2052 2052
2053 /* Create a channel to the NET kernel. */ 2053 /* Create a channel to the NET kernel. */
2054 if ((skfd = sockets_open(0)) < 0) { 2054 if ((skfd = sockets_open(0)) < 0) {
2055 perror_msg_and_die("socket"); 2055 bb_perror_msg_and_die("socket");
2056 } 2056 }
2057 2057
2058 /* Do we have to show the current setup? */ 2058 /* Do we have to show the current setup? */