diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-31 18:57:37 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-31 18:57:37 +0000 |
commit | 98ee06d3d46aa7f89c204681c7075b53300a6a6e (patch) | |
tree | 0f5cafbb22cd83fb73e024acba658c7a51582951 /networking/route.c | |
parent | 806116b23407bdf95f22646f11f50b1d14e1cfc2 (diff) | |
download | busybox-w32-98ee06d3d46aa7f89c204681c7075b53300a6a6e.tar.gz busybox-w32-98ee06d3d46aa7f89c204681c7075b53300a6a6e.tar.bz2 busybox-w32-98ee06d3d46aa7f89c204681c7075b53300a6a6e.zip |
stop using __u32 etc. uint32_t is there for a reason
Diffstat (limited to 'networking/route.c')
-rw-r--r-- | networking/route.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/networking/route.c b/networking/route.c index a8926f44e..d6d9b7dd9 100644 --- a/networking/route.c +++ b/networking/route.c | |||
@@ -462,17 +462,13 @@ static const char flagchars[] = /* Must agree with flagvals[]. */ | |||
462 | #endif | 462 | #endif |
463 | ; | 463 | ; |
464 | 464 | ||
465 | static | 465 | static void set_flags(char *flagstr, int flags) |
466 | #ifndef CONFIG_FEATURE_IPV6 | ||
467 | __inline | ||
468 | #endif | ||
469 | void set_flags(char *flagstr, int flags) | ||
470 | { | 466 | { |
471 | int i; | 467 | int i; |
472 | 468 | ||
473 | *flagstr++ = 'U'; | 469 | *flagstr++ = 'U'; |
474 | 470 | ||
475 | for (i=0 ; (*flagstr = flagchars[i]) != 0 ; i++) { | 471 | for (i = 0; (*flagstr = flagchars[i]) != 0; i++) { |
476 | if (flags & flagvals[i]) { | 472 | if (flags & flagvals[i]) { |
477 | ++flagstr; | 473 | ++flagstr; |
478 | } | 474 | } |
@@ -480,7 +476,6 @@ void set_flags(char *flagstr, int flags) | |||
480 | } | 476 | } |
481 | 477 | ||
482 | /* also used in netstat */ | 478 | /* also used in netstat */ |
483 | void displayroutes(int noresolve, int netstatfmt); | ||
484 | void displayroutes(int noresolve, int netstatfmt) | 479 | void displayroutes(int noresolve, int netstatfmt) |
485 | { | 480 | { |
486 | char devname[64], flags[16], sdest[16], sgw[16]; | 481 | char devname[64], flags[16], sdest[16], sgw[16]; |
@@ -492,9 +487,8 @@ void displayroutes(int noresolve, int netstatfmt) | |||
492 | FILE *fp = xfopen("/proc/net/route", "r"); | 487 | FILE *fp = xfopen("/proc/net/route", "r"); |
493 | 488 | ||
494 | printf("Kernel IP routing table\n" | 489 | printf("Kernel IP routing table\n" |
495 | "Destination Gateway Genmask" | 490 | "Destination Gateway Genmask Flags %s Iface\n", |
496 | " Flags %s Iface\n", | 491 | netstatfmt ? " MSS Window irtt" : "Metric Ref Use"); |
497 | netstatfmt ? " MSS Window irtt" : "Metric Ref Use"); | ||
498 | 492 | ||
499 | if (fscanf(fp, "%*[^\n]\n") < 0) { /* Skip the first line. */ | 493 | if (fscanf(fp, "%*[^\n]\n") < 0) { /* Skip the first line. */ |
500 | goto ERROR; /* Empty or missing line, or read error. */ | 494 | goto ERROR; /* Empty or missing line, or read error. */ |
@@ -508,7 +502,7 @@ void displayroutes(int noresolve, int netstatfmt) | |||
508 | if ((r < 0) && feof(fp)) { /* EOF with no (nonspace) chars read. */ | 502 | if ((r < 0) && feof(fp)) { /* EOF with no (nonspace) chars read. */ |
509 | break; | 503 | break; |
510 | } | 504 | } |
511 | ERROR: | 505 | ERROR: |
512 | bb_error_msg_and_die("fscanf"); | 506 | bb_error_msg_and_die("fscanf"); |
513 | } | 507 | } |
514 | 508 | ||
@@ -574,7 +568,7 @@ static void INET6_displayroutes(int noresolve) | |||
574 | if ((r < 0) && feof(fp)) { /* EOF with no (nonspace) chars read. */ | 568 | if ((r < 0) && feof(fp)) { /* EOF with no (nonspace) chars read. */ |
575 | break; | 569 | break; |
576 | } | 570 | } |
577 | ERROR: | 571 | ERROR: |
578 | bb_error_msg_and_die("fscanf"); | 572 | bb_error_msg_and_die("fscanf"); |
579 | } | 573 | } |
580 | 574 | ||