summaryrefslogtreecommitdiffstats
path: root/adb
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2018-05-14 13:17:56 -0700
committerJosh Gao <jmgao@google.com>2018-05-22 14:55:36 -0700
commite5353021baba3aff13e2dea6601aa8f31c5a42dc (patch)
tree521cb5963d929f61f870e031b6bc9b177d1a94ec /adb
parent71f775a9448d483e031767f0a1afb5ef104a36d0 (diff)
downloadsystem_core-e5353021baba3aff13e2dea6601aa8f31c5a42dc.tar.gz
system_core-e5353021baba3aff13e2dea6601aa8f31c5a42dc.tar.bz2
system_core-e5353021baba3aff13e2dea6601aa8f31c5a42dc.zip
adb: delete FDEVENT_DONTCLOSE.
The only existing usage of this doesn't actually need it. Bug: http://b/79786774 Test: mma Change-Id: If5e665705393e938cfdbf1526beb5496a8b99a9b
Diffstat (limited to 'adb')
-rw-r--r--adb/daemon/jdwp_service.cpp3
-rw-r--r--adb/fdevent.cpp9
-rw-r--r--adb/fdevent.h3
3 files changed, 2 insertions, 13 deletions
diff --git a/adb/daemon/jdwp_service.cpp b/adb/daemon/jdwp_service.cpp
index 89577cb7c..211d8f345 100644
--- a/adb/daemon/jdwp_service.cpp
+++ b/adb/daemon/jdwp_service.cpp
@@ -139,8 +139,6 @@ struct JdwpProcess {
fatal("could not create fdevent for new JDWP process");
}
- this->fde->state |= FDE_DONT_CLOSE;
-
/* start by waiting for the PID */
fdevent_add(this->fde, FDE_READ);
}
@@ -148,7 +146,6 @@ struct JdwpProcess {
~JdwpProcess() {
if (this->socket >= 0) {
adb_shutdown(this->socket);
- adb_close(this->socket);
this->socket = -1;
}
diff --git a/adb/fdevent.cpp b/adb/fdevent.cpp
index b3ff457ec..f9e262c51 100644
--- a/adb/fdevent.cpp
+++ b/adb/fdevent.cpp
@@ -111,9 +111,6 @@ static std::string dump_fde(const fdevent* fde) {
if (fde->state & FDE_ERROR) {
state += "E";
}
- if (fde->state & FDE_DONT_CLOSE) {
- state += "D";
- }
return android::base::StringPrintf("(fdevent %d %s)", fde->fd, state.c_str());
}
@@ -157,10 +154,8 @@ void fdevent_destroy(fdevent* fde) {
if (fde->state & FDE_PENDING) {
g_pending_list.remove(fde);
}
- if (!(fde->state & FDE_DONT_CLOSE)) {
- adb_close(fde->fd);
- fde->fd = -1;
- }
+ adb_close(fde->fd);
+ fde->fd = -1;
fde->state = 0;
fde->events = 0;
}
diff --git a/adb/fdevent.h b/adb/fdevent.h
index 2d8efd8db..9c6e06999 100644
--- a/adb/fdevent.h
+++ b/adb/fdevent.h
@@ -27,9 +27,6 @@
#define FDE_WRITE 0x0002
#define FDE_ERROR 0x0004
-/* features that may be set (via the events set/add/del interface) */
-#define FDE_DONT_CLOSE 0x0080
-
typedef void (*fd_func)(int fd, unsigned events, void *userdata);
struct fdevent {