diff options
author | vodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-12-06 12:00:39 +0000 |
---|---|---|
committer | vodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-12-06 12:00:39 +0000 |
commit | 7772c275be7480cb8424204debe5726fc4e9790a (patch) | |
tree | 37e1ec1e361da1347056461337e5be8e446e11a0 | |
parent | 07ed7a882813ffbab68dbba5fcd62e3507c47274 (diff) | |
download | busybox-w32-7772c275be7480cb8424204debe5726fc4e9790a.tar.gz busybox-w32-7772c275be7480cb8424204debe5726fc4e9790a.tar.bz2 busybox-w32-7772c275be7480cb8424204debe5726fc4e9790a.zip |
restore compare_string_array new interface (make broken by landley)
git-svn-id: svn://busybox.net/trunk/busybox@12690 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | include/libbb.h | 2 | ||||
-rw-r--r-- | miscutils/devfsd.c | 4 | ||||
-rw-r--r-- | networking/libiproute/ipaddress.c | 6 | ||||
-rw-r--r-- | networking/libiproute/iproute.c | 10 |
4 files changed, 12 insertions, 10 deletions
diff --git a/include/libbb.h b/include/libbb.h index 96dc46a09..52d91c826 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -467,7 +467,7 @@ typedef struct { | |||
467 | } procps_status_t; | 467 | } procps_status_t; |
468 | 468 | ||
469 | extern procps_status_t * procps_scan(int save_user_arg0); | 469 | extern procps_status_t * procps_scan(int save_user_arg0); |
470 | extern unsigned short compare_string_array(const char *string_array[], const char *key); | 470 | extern int compare_string_array(const char * const string_array[], const char *key); |
471 | 471 | ||
472 | extern int my_query_module(const char *name, int which, void **buf, size_t *bufsize, size_t *ret); | 472 | extern int my_query_module(const char *name, int which, void **buf, size_t *bufsize, size_t *ret); |
473 | 473 | ||
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index cc1c5e1f0..62d217345 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -611,7 +611,7 @@ static void process_config_line (const char *line, unsigned long *event_mask) | |||
611 | "PERMISSIONS", "MODLOAD", "EXECUTE", "COPY", "IGNORE", | 611 | "PERMISSIONS", "MODLOAD", "EXECUTE", "COPY", "IGNORE", |
612 | "MKOLDCOMPAT", "MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT", 0 }; | 612 | "MKOLDCOMPAT", "MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT", 0 }; |
613 | 613 | ||
614 | short int i; | 614 | int i; |
615 | 615 | ||
616 | debug_msg_logger(LOG_INFO, __FUNCTION__); | 616 | debug_msg_logger(LOG_INFO, __FUNCTION__); |
617 | 617 | ||
@@ -1295,7 +1295,7 @@ static const char *get_variable (const char *variable, void *info) | |||
1295 | const char *field_names[] = { "hostname", "mntpt", "devpath", "devname", | 1295 | const char *field_names[] = { "hostname", "mntpt", "devpath", "devname", |
1296 | "uid", "gid", "mode", hostname, mount_point, | 1296 | "uid", "gid", "mode", hostname, mount_point, |
1297 | gv_info->devpath, gv_info->devname, 0 }; | 1297 | gv_info->devpath, gv_info->devname, 0 }; |
1298 | short int i; | 1298 | int i; |
1299 | 1299 | ||
1300 | debug_msg_logger(LOG_INFO, __FUNCTION__); | 1300 | debug_msg_logger(LOG_INFO, __FUNCTION__); |
1301 | 1301 | ||
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index 1c89f4a7d..c6115b356 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c | |||
@@ -443,7 +443,7 @@ extern int ipaddr_list_or_flush(int argc, char **argv, int flush) | |||
443 | } | 443 | } |
444 | 444 | ||
445 | while (argc > 0) { | 445 | while (argc > 0) { |
446 | const unsigned short option_num = compare_string_array(option, *argv); | 446 | const int option_num = compare_string_array(option, *argv); |
447 | switch (option_num) { | 447 | switch (option_num) { |
448 | case 0: /* to */ | 448 | case 0: /* to */ |
449 | NEXT_ARG(); | 449 | NEXT_ARG(); |
@@ -658,7 +658,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv) | |||
658 | req.ifa.ifa_family = preferred_family; | 658 | req.ifa.ifa_family = preferred_family; |
659 | 659 | ||
660 | while (argc > 0) { | 660 | while (argc > 0) { |
661 | const unsigned short option_num = compare_string_array(option, *argv); | 661 | const int option_num = compare_string_array(option, *argv); |
662 | switch (option_num) { | 662 | switch (option_num) { |
663 | case 0: /* peer */ | 663 | case 0: /* peer */ |
664 | case 1: /* remote */ | 664 | case 1: /* remote */ |
@@ -805,7 +805,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv) | |||
805 | extern int do_ipaddr(int argc, char **argv) | 805 | extern int do_ipaddr(int argc, char **argv) |
806 | { | 806 | { |
807 | const char *commands[] = { "add", "delete", "list", "show", "lst", "flush", 0 }; | 807 | const char *commands[] = { "add", "delete", "list", "show", "lst", "flush", 0 }; |
808 | unsigned short command_num = 2; | 808 | int command_num = 2; |
809 | 809 | ||
810 | if (*argv) { | 810 | if (*argv) { |
811 | command_num = compare_string_array(commands, *argv); | 811 | command_num = compare_string_array(commands, *argv); |
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index cc229c206..d7900d62e 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
@@ -654,7 +654,8 @@ static int iproute_get(int argc, char **argv) | |||
654 | char *odev = NULL; | 654 | char *odev = NULL; |
655 | int connected = 0; | 655 | int connected = 0; |
656 | int from_ok = 0; | 656 | int from_ok = 0; |
657 | const char *options[] = { "from", "iif", "oif", "dev", "notify", "connected", "to", 0 }; | 657 | static const char * const options[] = |
658 | { "from", "iif", "oif", "dev", "notify", "connected", "to", 0 }; | ||
658 | 659 | ||
659 | memset(&req, 0, sizeof(req)); | 660 | memset(&req, 0, sizeof(req)); |
660 | 661 | ||
@@ -813,9 +814,10 @@ static int iproute_get(int argc, char **argv) | |||
813 | 814 | ||
814 | int do_iproute(int argc, char **argv) | 815 | int do_iproute(int argc, char **argv) |
815 | { | 816 | { |
816 | const char *ip_route_commands[] = { "add", "append", "change", "chg", | 817 | static const char * const ip_route_commands[] = |
817 | "delete", "del", "get", "list", "show", "prepend", "replace", "test", "flush", 0 }; | 818 | { "add", "append", "change", "chg", "delete", "del", "get", |
818 | unsigned short command_num = 7; | 819 | "list", "show", "prepend", "replace", "test", "flush", 0 }; |
820 | int command_num = 7; | ||
819 | unsigned int flags = 0; | 821 | unsigned int flags = 0; |
820 | int cmd = RTM_NEWROUTE; | 822 | int cmd = RTM_NEWROUTE; |
821 | 823 | ||