summaryrefslogtreecommitdiff
path: root/networking/ifconfig.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 /networking/ifconfig.c
parente01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff)
downloadbusybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz
busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.bz2
busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.zip
Major coreutils update.
Diffstat (limited to 'networking/ifconfig.c')
-rw-r--r--networking/ifconfig.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index 95cc07ab0..c09c48c58 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -15,7 +15,7 @@
15 * Foundation; either version 2 of the License, or (at 15 * Foundation; either version 2 of the License, or (at
16 * your option) any later version. 16 * your option) any later version.
17 * 17 *
18 * $Id: ifconfig.c,v 1.22 2003/01/14 08:54:07 andersen Exp $ 18 * $Id: ifconfig.c,v 1.23 2003/03/19 09:12:38 mjn3 Exp $
19 * 19 *
20 */ 20 */
21 21
@@ -323,14 +323,14 @@ int ifconfig_main(int argc, char **argv)
323#ifdef CONFIG_FEATURE_IFCONFIG_STATUS 323#ifdef CONFIG_FEATURE_IFCONFIG_STATUS
324 return display_interfaces(argc ? *argv : NULL); 324 return display_interfaces(argc ? *argv : NULL);
325#else 325#else
326 error_msg_and_die 326 bb_error_msg_and_die
327 ("ifconfig was not compiled with interface status display support."); 327 ("ifconfig was not compiled with interface status display support.");
328#endif 328#endif
329 } 329 }
330 330
331 /* Create a channel to the NET kernel. */ 331 /* Create a channel to the NET kernel. */
332 if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { 332 if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
333 perror_msg_and_die("socket"); 333 bb_perror_msg_and_die("socket");
334 } 334 }
335 335
336 /* get interface name */ 336 /* get interface name */
@@ -366,11 +366,11 @@ int ifconfig_main(int argc, char **argv)
366 mask = op->arg_flags; 366 mask = op->arg_flags;
367 a1op = Arg1Opt + (op - OptArray); 367 a1op = Arg1Opt + (op - OptArray);
368 if (mask & A_NETMASK & did_flags) { 368 if (mask & A_NETMASK & did_flags) {
369 show_usage(); 369 bb_show_usage();
370 } 370 }
371 if (*++argv == NULL) { 371 if (*++argv == NULL) {
372 if (mask & A_ARG_REQ) { 372 if (mask & A_ARG_REQ) {
373 show_usage(); 373 bb_show_usage();
374 } else { 374 } else {
375 --argv; 375 --argv;
376 mask &= A_SET_AFTER; /* just for broadcast */ 376 mask &= A_SET_AFTER; /* just for broadcast */
@@ -421,7 +421,7 @@ int ifconfig_main(int argc, char **argv)
421 421
422 /* Create a channel to the NET kernel. */ 422 /* Create a channel to the NET kernel. */
423 if ((sockfd6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { 423 if ((sockfd6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
424 perror_msg_and_die("socket6"); 424 bb_perror_msg_and_die("socket6");
425 } 425 }
426 if (ioctl(sockfd6, SIOGIFINDEX, &ifr) < 0) { 426 if (ioctl(sockfd6, SIOGIFINDEX, &ifr) < 0) {
427 perror("SIOGIFINDEX"); 427 perror("SIOGIFINDEX");
@@ -454,11 +454,11 @@ int ifconfig_main(int argc, char **argv)
454 } else { /* A_CAST_HOST_COPY_IN_ETHER */ 454 } else { /* A_CAST_HOST_COPY_IN_ETHER */
455 /* This is the "hw" arg case. */ 455 /* This is the "hw" arg case. */
456 if (strcmp("ether", *argv) || (*++argv == NULL)) { 456 if (strcmp("ether", *argv) || (*++argv == NULL)) {
457 show_usage(); 457 bb_show_usage();
458 } 458 }
459 safe_strncpy(host, *argv, (sizeof host)); 459 safe_strncpy(host, *argv, (sizeof host));
460 if (in_ether(host, &sa)) { 460 if (in_ether(host, &sa)) {
461 error_msg("invalid hw-addr %s", host); 461 bb_error_msg("invalid hw-addr %s", host);
462 ++goterr; 462 ++goterr;
463 continue; 463 continue;
464 } 464 }