svn commit: trunk/busybox/networking

aldot at busybox.net aldot at busybox.net
Mon Dec 12 10:21:37 UTC 2005


Author: aldot
Date: 2005-12-12 02:21:35 -0800 (Mon, 12 Dec 2005)
New Revision: 12846

Log:
- fix zcip for IMA compile mode.
  rename usage() to zcip_usage, make struct arp_packet static. This applet is
  not ISO C89 compatible due to the use of C99-style comments ("c++ comments).


Modified:
   trunk/busybox/networking/zcip.c


Changeset:
Modified: trunk/busybox/networking/zcip.c
===================================================================
--- trunk/busybox/networking/zcip.c	2005-12-12 07:04:59 UTC (rev 12845)
+++ trunk/busybox/networking/zcip.c	2005-12-12 10:21:35 UTC (rev 12846)
@@ -65,7 +65,7 @@
 #include <linux/sockios.h>
 
 
-struct arp_packet {
+static struct arp_packet {
 	struct ether_header hdr;
 	// FIXME this part is netinet/if_ether.h "struct ether_arp"
 	struct arphdr arp;
@@ -214,8 +214,8 @@
 /**
  * Print usage information.
  */
-static void __attribute__ ((noreturn))
-usage(const char *msg)
+static void __attribute__((noreturn))
+zcip_usage(const char *msg)
 {
 	fprintf(stderr, "%s: %s\n", prog, msg);
 #ifdef	NO_BUSYBOX
@@ -284,7 +284,7 @@
 			if (inet_aton(optarg, &ip) == 0
 					|| (ntohl(ip.s_addr) & IN_CLASSB_NET)
 						!= LINKLOCAL_ADDR) {
-				usage("invalid link address");
+				zcip_usage("invalid link address");
 			}
 			continue;
 		case 'v':
@@ -294,7 +294,7 @@
 			foreground = 1;
 			continue;
 		default:
-			usage("bad option");
+			zcip_usage("bad option");
 		}
 	}
 	if (optind < argc - 1) {
@@ -303,7 +303,7 @@
 		script = argv[optind++];
 	}
 	if (optind != argc || !intf)
-		usage("wrong number of arguments");
+		zcip_usage("wrong number of arguments");
 	openlog(prog, 0, LOG_DAEMON);
 
 	// initialize the interface (modprobe, ifup, etc)




More information about the busybox-cvs mailing list