svn commit: trunk/busybox: include miscutils networking/libiproute

vodz at busybox.net vodz at busybox.net
Tue Dec 6 12:00:41 UTC 2005


Author: vodz
Date: 2005-12-06 04:00:39 -0800 (Tue, 06 Dec 2005)
New Revision: 12690

Log:
restore compare_string_array new interface (make broken by landley)

Modified:
   trunk/busybox/include/libbb.h
   trunk/busybox/miscutils/devfsd.c
   trunk/busybox/networking/libiproute/ipaddress.c
   trunk/busybox/networking/libiproute/iproute.c


Changeset:
Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h	2005-12-06 04:56:55 UTC (rev 12689)
+++ trunk/busybox/include/libbb.h	2005-12-06 12:00:39 UTC (rev 12690)
@@ -467,7 +467,7 @@
 } procps_status_t;
 
 extern procps_status_t * procps_scan(int save_user_arg0);
-extern unsigned short compare_string_array(const char *string_array[], const char *key);
+extern int compare_string_array(const char * const string_array[], const char *key);
 
 extern int my_query_module(const char *name, int which, void **buf, size_t *bufsize, size_t *ret);
 

Modified: trunk/busybox/miscutils/devfsd.c
===================================================================
--- trunk/busybox/miscutils/devfsd.c	2005-12-06 04:56:55 UTC (rev 12689)
+++ trunk/busybox/miscutils/devfsd.c	2005-12-06 12:00:39 UTC (rev 12690)
@@ -611,7 +611,7 @@
 								"PERMISSIONS", "MODLOAD", "EXECUTE", "COPY", "IGNORE",
 								"MKOLDCOMPAT", "MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT", 0 };
 
-	short int i;
+	int i;
 
 	debug_msg_logger(LOG_INFO, __FUNCTION__);
 
@@ -1295,7 +1295,7 @@
 	const char *field_names[] = { "hostname", "mntpt", "devpath", "devname",
 								   "uid", "gid", "mode", hostname, mount_point,
 								   gv_info->devpath, gv_info->devname, 0 };
-	short int i;
+	int i;
 
 	debug_msg_logger(LOG_INFO, __FUNCTION__);
 

Modified: trunk/busybox/networking/libiproute/ipaddress.c
===================================================================
--- trunk/busybox/networking/libiproute/ipaddress.c	2005-12-06 04:56:55 UTC (rev 12689)
+++ trunk/busybox/networking/libiproute/ipaddress.c	2005-12-06 12:00:39 UTC (rev 12690)
@@ -443,7 +443,7 @@
 	}
 
 	while (argc > 0) {
-		const unsigned short option_num = compare_string_array(option, *argv);
+		const int option_num = compare_string_array(option, *argv);
 		switch (option_num) {
 			case 0: /* to */
 				NEXT_ARG();
@@ -658,7 +658,7 @@
 	req.ifa.ifa_family = preferred_family;
 
 	while (argc > 0) {
-		const unsigned short option_num = compare_string_array(option, *argv);
+		const int option_num = compare_string_array(option, *argv);
 		switch (option_num) {
 			case 0: /* peer */
 			case 1: /* remote */
@@ -805,7 +805,7 @@
 extern int do_ipaddr(int argc, char **argv)
 {
 	const char *commands[] = { "add", "delete", "list", "show", "lst", "flush", 0 };
-	unsigned short command_num = 2;
+	int command_num = 2;
 
 	if (*argv) {
 		command_num = compare_string_array(commands, *argv);

Modified: trunk/busybox/networking/libiproute/iproute.c
===================================================================
--- trunk/busybox/networking/libiproute/iproute.c	2005-12-06 04:56:55 UTC (rev 12689)
+++ trunk/busybox/networking/libiproute/iproute.c	2005-12-06 12:00:39 UTC (rev 12690)
@@ -654,7 +654,8 @@
 	char  *odev = NULL;
 	int connected = 0;
 	int from_ok = 0;
-	const char *options[] = { "from", "iif", "oif", "dev", "notify", "connected", "to", 0 };
+	static const char * const options[] = 
+		{ "from", "iif", "oif", "dev", "notify", "connected", "to", 0 };
 
 	memset(&req, 0, sizeof(req));
 
@@ -813,9 +814,10 @@
 
 int do_iproute(int argc, char **argv)
 {
-	const char *ip_route_commands[] = { "add", "append", "change", "chg",
-		"delete", "del", "get", "list", "show", "prepend", "replace", "test", "flush", 0 };
-	unsigned short command_num = 7;
+	static const char * const ip_route_commands[] = 
+		{ "add", "append", "change", "chg", "delete", "del", "get", 
+		"list", "show", "prepend", "replace", "test", "flush", 0 };
+	int command_num = 7;
 	unsigned int flags = 0;
 	int cmd = RTM_NEWROUTE;
 




More information about the busybox-cvs mailing list