summaryrefslogtreecommitdiffstats
path: root/toolbox
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-07-29 15:53:16 -0700
committerJean-Baptiste Queru <jbq@google.com>2010-07-29 15:53:16 -0700
commit60c8f863ca84f3e5bb8e78d8001c53511f094d53 (patch)
tree0af3cd99e4e85251ae4b32a4967e03b6e5e8716f /toolbox
parent42b871f1bfc116d53d1bff9d7497415494b2e0e0 (diff)
parent0fcbdb4147858d40d581d3b034f5150962632943 (diff)
downloadcore-60c8f863ca84f3e5bb8e78d8001c53511f094d53.tar.gz
core-60c8f863ca84f3e5bb8e78d8001c53511f094d53.tar.bz2
core-60c8f863ca84f3e5bb8e78d8001c53511f094d53.zip
resolved conflicts for merge of 0fcbdb41 to gingerbread-plus-aosp
Change-Id: I1396cd97b28f316849016d55596ad52fffd3235c
Diffstat (limited to 'toolbox')
-rw-r--r--toolbox/Android.mk2
-rw-r--r--toolbox/route.c24
2 files changed, 18 insertions, 8 deletions
diff --git a/toolbox/Android.mk b/toolbox/Android.mk
index 588dac0b2..ef3980aaa 100644
--- a/toolbox/Android.mk
+++ b/toolbox/Android.mk
@@ -41,7 +41,7 @@ TOOLS := \
printenv \
smd \
chmod \
- chown \
+ chown \
newfs_msdos \
netstat \
ioctl \
diff --git a/toolbox/route.c b/toolbox/route.c
index 107e48aa9..3e1001435 100644
--- a/toolbox/route.c
+++ b/toolbox/route.c
@@ -80,14 +80,24 @@ int route_main(int argc, char *argv[])
/* route add -net 192.168.1.2 netmask 255.255.255.0 gw 192.168.1.1 */
if (argc > 7 && !strcmp(argv[2], "-net") &&
- !strcmp(argv[4], "netmask") && !strcmp(argv[6], "gw")) {
- rt.rt_flags = RTF_UP | RTF_GATEWAY;
- if (set_address(argv[3], &rt.rt_dst) &&
- set_address(argv[5], &rt.rt_genmask) &&
- set_address(argv[7], &rt.rt_gateway)) {
- errno = 0;
+ !strcmp(argv[4], "netmask")) {
+ if (!strcmp(argv[6], "gw")) {
+ rt.rt_flags = RTF_UP | RTF_GATEWAY;
+ if (set_address(argv[3], &rt.rt_dst) &&
+ set_address(argv[5], &rt.rt_genmask) &&
+ set_address(argv[7], &rt.rt_gateway)) {
+ errno = 0;
+ }
+ goto apply;
+ } else if (!strcmp(argv[6], "dev")) {
+ rt.rt_flags = RTF_UP;
+ rt.rt_dev = argv[7];
+ if (set_address(argv[3], &rt.rt_dst) &&
+ set_address(argv[5], &rt.rt_genmask)) {
+ errno = 0;
+ }
+ goto apply;
}
- goto apply;
}
}