Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5353021 authored by Josh Gao's avatar Josh Gao
Browse files

adb: delete FDEVENT_DONTCLOSE.

The only existing usage of this doesn't actually need it.

Bug: http://b/79786774
Test: mma
Change-Id: If5e665705393e938cfdbf1526beb5496a8b99a9b
parent 71f775a9
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -139,8 +139,6 @@ struct JdwpProcess {
            fatal("could not create fdevent for new JDWP process");
            fatal("could not create fdevent for new JDWP process");
        }
        }


        this->fde->state |= FDE_DONT_CLOSE;

        /* start by waiting for the PID */
        /* start by waiting for the PID */
        fdevent_add(this->fde, FDE_READ);
        fdevent_add(this->fde, FDE_READ);
    }
    }
@@ -148,7 +146,6 @@ struct JdwpProcess {
    ~JdwpProcess() {
    ~JdwpProcess() {
        if (this->socket >= 0) {
        if (this->socket >= 0) {
            adb_shutdown(this->socket);
            adb_shutdown(this->socket);
            adb_close(this->socket);
            this->socket = -1;
            this->socket = -1;
        }
        }


+2 −7
Original line number Original line Diff line number Diff line
@@ -111,9 +111,6 @@ static std::string dump_fde(const fdevent* fde) {
    if (fde->state & FDE_ERROR) {
    if (fde->state & FDE_ERROR) {
        state += "E";
        state += "E";
    }
    }
    if (fde->state & FDE_DONT_CLOSE) {
        state += "D";
    }
    return android::base::StringPrintf("(fdevent %d %s)", fde->fd, state.c_str());
    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) {
        if (fde->state & FDE_PENDING) {
            g_pending_list.remove(fde);
            g_pending_list.remove(fde);
        }
        }
        if (!(fde->state & FDE_DONT_CLOSE)) {
        adb_close(fde->fd);
        adb_close(fde->fd);
        fde->fd = -1;
        fde->fd = -1;
        }
        fde->state = 0;
        fde->state = 0;
        fde->events = 0;
        fde->events = 0;
    }
    }
+0 −3
Original line number Original line Diff line number Diff line
@@ -27,9 +27,6 @@
#define FDE_WRITE             0x0002
#define FDE_WRITE             0x0002
#define FDE_ERROR             0x0004
#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);
typedef void (*fd_func)(int fd, unsigned events, void *userdata);


struct fdevent {
struct fdevent {