aboutsummaryrefslogtreecommitdiffstats
path: root/adb/commandline.c
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2009-10-11 23:04:18 -0400
committerMike Lockwood <lockwood@android.com>2009-10-11 23:04:18 -0400
commit8cf0d59f61ae0b8554ecf3fe051850508b761b79 (patch)
tree6f469ac4f8d5b98abedac1660822efd4b7b5649e /adb/commandline.c
parent1dec5032cfadc1a3d7687ce5b6cd322e4151ce9d (diff)
downloadsystem_core-8cf0d59f61ae0b8554ecf3fe051850508b761b79.tar.gz
system_core-8cf0d59f61ae0b8554ecf3fe051850508b761b79.tar.bz2
system_core-8cf0d59f61ae0b8554ecf3fe051850508b761b79.zip
adb: Add "adb disconnect" command for disconnecting TCP/IP devices.
Also check that device is not already connected in "adb connect" Change-Id: I5f84b56b63d8c6932f23791cac319fd6bc39d36c Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'adb/commandline.c')
-rw-r--r--adb/commandline.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/adb/commandline.c b/adb/commandline.c
index 411bb82a..055aa104 100644
--- a/adb/commandline.c
+++ b/adb/commandline.c
@@ -106,6 +106,7 @@ void help()
" be an absolute path.\n"
" devices - list all connected devices\n"
" connect <host>:<port> - connect to a device via TCP/IP"
+ " disconnect <host>:<port> - disconnect from a TCP/IP device"
"\n"
"device commands:\n"
" adb push <local> <remote> - copy file/dir to device\n"
@@ -853,10 +854,10 @@ top:
}
}
- if(!strcmp(argv[0], "connect")) {
+ if(!strcmp(argv[0], "connect") || !strcmp(argv[0], "disconnect")) {
char *tmp;
if (argc != 2) {
- fprintf(stderr, "Usage: adb connect <host>:<port>\n");
+ fprintf(stderr, "Usage: adb %s <host>:<port>\n", argv[0]);
return 1;
}
snprintf(buf, sizeof buf, "host:%s:%s", argv[0], argv[1]);