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

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

adb: add error-generating overload of adb_close(unique_fd).

Test: mma
Change-Id: Id9c1230394afe980ba90dbd5150b65e8bf997b6c
parent 56300c9d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -31,3 +31,7 @@ using unique_fd = android::base::unique_fd_impl<AdbCloser>;
#if !defined(_WIN32)
bool Pipe(unique_fd* read, unique_fd* write, int flags = 0);
#endif

template <typename T>
int adb_close(const android::base::unique_fd_impl<T>&)
        __attribute__((__unavailable__("adb_close called on unique_fd")));