diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-10-26 23:21:47 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-10-26 23:21:47 +0000 |
commit | 6dc3a21627db11fa0f374afe29a6bbf4f89c8b64 (patch) | |
tree | 79166b700c497fbe798b6031e5bbff97e0933573 /networking | |
parent | 076d919b597733c0adf653d0ad10073be4adec7f (diff) | |
download | busybox-w32-6dc3a21627db11fa0f374afe29a6bbf4f89c8b64.tar.gz busybox-w32-6dc3a21627db11fa0f374afe29a6bbf4f89c8b64.tar.bz2 busybox-w32-6dc3a21627db11fa0f374afe29a6bbf4f89c8b64.zip |
remove bb_printf and the like
git-svn-id: svn://busybox.net/trunk/busybox@16446 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'networking')
-rw-r--r-- | networking/route.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/networking/route.c b/networking/route.c index 65b40fcd6..c99405d72 100644 --- a/networking/route.c +++ b/networking/route.c | |||
@@ -491,7 +491,7 @@ void displayroutes(int noresolve, int netstatfmt) | |||
491 | 491 | ||
492 | FILE *fp = xfopen("/proc/net/route", "r"); | 492 | FILE *fp = xfopen("/proc/net/route", "r"); |
493 | 493 | ||
494 | bb_printf("Kernel IP routing table\n" | 494 | printf("Kernel IP routing table\n" |
495 | "Destination Gateway Genmask" | 495 | "Destination Gateway Genmask" |
496 | " Flags %s Iface\n", | 496 | " Flags %s Iface\n", |
497 | netstatfmt ? " MSS Window irtt" : "Metric Ref Use"); | 497 | netstatfmt ? " MSS Window irtt" : "Metric Ref Use"); |
@@ -534,11 +534,11 @@ void displayroutes(int noresolve, int netstatfmt) | |||
534 | (noresolve | 0x4000), m); /* Host instead of net. */ | 534 | (noresolve | 0x4000), m); /* Host instead of net. */ |
535 | 535 | ||
536 | mask.s_addr = m; | 536 | mask.s_addr = m; |
537 | bb_printf("%-16s%-16s%-16s%-6s", sdest, sgw, inet_ntoa(mask), flags); | 537 | printf("%-16s%-16s%-16s%-6s", sdest, sgw, inet_ntoa(mask), flags); |
538 | if (netstatfmt) { | 538 | if (netstatfmt) { |
539 | bb_printf("%5d %-5d %6d %s\n", mtu, win, ir, devname); | 539 | printf("%5d %-5d %6d %s\n", mtu, win, ir, devname); |
540 | } else { | 540 | } else { |
541 | bb_printf("%-6d %-2d %7d %s\n", metric, ref, use, devname); | 541 | printf("%-6d %-2d %7d %s\n", metric, ref, use, devname); |
542 | } | 542 | } |
543 | } | 543 | } |
544 | } | 544 | } |
@@ -561,7 +561,7 @@ static void INET6_displayroutes(int noresolve) | |||
561 | 561 | ||
562 | FILE *fp = xfopen("/proc/net/ipv6_route", "r"); | 562 | FILE *fp = xfopen("/proc/net/ipv6_route", "r"); |
563 | 563 | ||
564 | bb_printf("Kernel IPv6 routing table\n%-44s%-40s" | 564 | printf("Kernel IPv6 routing table\n%-44s%-40s" |
565 | "Flags Metric Ref Use Iface\n", | 565 | "Flags Metric Ref Use Iface\n", |
566 | "Destination", "Next Hop"); | 566 | "Destination", "Next Hop"); |
567 | 567 | ||
@@ -622,7 +622,7 @@ static void INET6_displayroutes(int noresolve) | |||
622 | r += 40; | 622 | r += 40; |
623 | } else { /* 2nd pass */ | 623 | } else { /* 2nd pass */ |
624 | /* Print the info. */ | 624 | /* Print the info. */ |
625 | bb_printf("%-43s %-39s %-5s %-6d %-2d %7d %-8s\n", | 625 | printf("%-43s %-39s %-5s %-6d %-2d %7d %-8s\n", |
626 | addr6, naddr6, flags, metric, refcnt, use, iface); | 626 | addr6, naddr6, flags, metric, refcnt, use, iface); |
627 | break; | 627 | break; |
628 | } | 628 | } |
@@ -650,15 +650,13 @@ int route_main(int argc, char **argv) | |||
650 | unsigned opt; | 650 | unsigned opt; |
651 | int what; | 651 | int what; |
652 | char *family; | 652 | char *family; |
653 | char **p; | ||
653 | 654 | ||
654 | /* First, remap '-net' and '-host' to avoid getopt problems. */ | 655 | /* First, remap '-net' and '-host' to avoid getopt problems. */ |
655 | { | 656 | p = argv; |
656 | char **p = argv; | 657 | while (*++p) { |
657 | 658 | if ((strcmp(*p, "-net") == 0) || (strcmp(*p, "-host") == 0)) { | |
658 | while (*++p) { | 659 | p[0][0] = '#'; |
659 | if ((strcmp(*p, "-net") == 0) || (strcmp(*p, "-host") == 0)) { | ||
660 | p[0][0] = '#'; | ||
661 | } | ||
662 | } | 660 | } |
663 | } | 661 | } |
664 | 662 | ||
@@ -685,8 +683,7 @@ int route_main(int argc, char **argv) | |||
685 | #endif | 683 | #endif |
686 | displayroutes(noresolve, opt & ROUTE_OPT_e); | 684 | displayroutes(noresolve, opt & ROUTE_OPT_e); |
687 | 685 | ||
688 | xferror_stdout(); | 686 | fflush_stdout_and_exit(EXIT_SUCCESS); |
689 | bb_fflush_stdout_and_exit(EXIT_SUCCESS); | ||
690 | } | 687 | } |
691 | 688 | ||
692 | /* Check verb. At the moment, must be add, del, or delete. */ | 689 | /* Check verb. At the moment, must be add, del, or delete. */ |