Loading adb/adb.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ void start_device_log(void) { dup2(fd, STDOUT_FILENO); dup2(fd, STDERR_FILENO); fprintf(stderr, "--- adb starting (pid %d) ---\n", getpid()); adb_close(fd); unix_close(fd); } #endif Loading adb/adb_auth_host.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -420,6 +420,9 @@ int adb_auth_get_userkey(unsigned char *data, size_t len) strcat(path, ".pub"); // TODO(danalbert): ReadFileToString // Note that on Windows, load_file() does not do CR/LF translation, but // ReadFileToString() uses the C Runtime which uses CR/LF translation by // default (by is overridable with _setmode()). unsigned size; char* file_data = reinterpret_cast<char*>(load_file(path, &size)); if (file_data == nullptr) { Loading adb/daemon/main.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -226,7 +226,7 @@ static void close_stdin() { return; } dup2(fd, STDIN_FILENO); adb_close(fd); unix_close(fd); } int main(int argc, char** argv) { Loading adb/remount_service.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ bool make_block_device_writable(const std::string& dev) { int OFF = 0; bool result = (ioctl(fd, BLKROSET, &OFF) != -1); adb_close(fd); unix_close(fd); return result; } Loading adb/services.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -252,7 +252,7 @@ static int create_subproc_pty(const char* cmd, const char* arg0, *pid = forkpty(&ptm, pts_name, nullptr, nullptr); if (*pid == -1) { printf("- fork failed: %s -\n", strerror(errno)); adb_close(ptm); unix_close(ptm); return -1; } Loading @@ -263,7 +263,7 @@ static int create_subproc_pty(const char* cmd, const char* arg0, if (pts == -1) { fprintf(stderr, "child failed to open pseudo-term slave %s: %s\n", pts_name, strerror(errno)); adb_close(ptm); unix_close(ptm); exit(-1); } Loading @@ -272,16 +272,16 @@ static int create_subproc_pty(const char* cmd, const char* arg0, termios tattr; if (tcgetattr(pts, &tattr) == -1) { fprintf(stderr, "tcgetattr failed: %s\n", strerror(errno)); adb_close(pts); adb_close(ptm); unix_close(pts); unix_close(ptm); exit(-1); } cfmakeraw(&tattr); if (tcsetattr(pts, TCSADRAIN, &tattr) == -1) { fprintf(stderr, "tcsetattr failed: %s\n", strerror(errno)); adb_close(pts); adb_close(ptm); unix_close(pts); unix_close(ptm); exit(-1); } } Loading @@ -290,8 +290,8 @@ static int create_subproc_pty(const char* cmd, const char* arg0, dup2(pts, STDOUT_FILENO); dup2(pts, STDERR_FILENO); adb_close(pts); adb_close(ptm); unix_close(pts); unix_close(ptm); execl(cmd, cmd, arg0, arg1, nullptr); fprintf(stderr, "- exec '%s' failed: %s (%d) -\n", Loading Loading
adb/adb.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ void start_device_log(void) { dup2(fd, STDOUT_FILENO); dup2(fd, STDERR_FILENO); fprintf(stderr, "--- adb starting (pid %d) ---\n", getpid()); adb_close(fd); unix_close(fd); } #endif Loading
adb/adb_auth_host.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -420,6 +420,9 @@ int adb_auth_get_userkey(unsigned char *data, size_t len) strcat(path, ".pub"); // TODO(danalbert): ReadFileToString // Note that on Windows, load_file() does not do CR/LF translation, but // ReadFileToString() uses the C Runtime which uses CR/LF translation by // default (by is overridable with _setmode()). unsigned size; char* file_data = reinterpret_cast<char*>(load_file(path, &size)); if (file_data == nullptr) { Loading
adb/daemon/main.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -226,7 +226,7 @@ static void close_stdin() { return; } dup2(fd, STDIN_FILENO); adb_close(fd); unix_close(fd); } int main(int argc, char** argv) { Loading
adb/remount_service.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ bool make_block_device_writable(const std::string& dev) { int OFF = 0; bool result = (ioctl(fd, BLKROSET, &OFF) != -1); adb_close(fd); unix_close(fd); return result; } Loading
adb/services.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -252,7 +252,7 @@ static int create_subproc_pty(const char* cmd, const char* arg0, *pid = forkpty(&ptm, pts_name, nullptr, nullptr); if (*pid == -1) { printf("- fork failed: %s -\n", strerror(errno)); adb_close(ptm); unix_close(ptm); return -1; } Loading @@ -263,7 +263,7 @@ static int create_subproc_pty(const char* cmd, const char* arg0, if (pts == -1) { fprintf(stderr, "child failed to open pseudo-term slave %s: %s\n", pts_name, strerror(errno)); adb_close(ptm); unix_close(ptm); exit(-1); } Loading @@ -272,16 +272,16 @@ static int create_subproc_pty(const char* cmd, const char* arg0, termios tattr; if (tcgetattr(pts, &tattr) == -1) { fprintf(stderr, "tcgetattr failed: %s\n", strerror(errno)); adb_close(pts); adb_close(ptm); unix_close(pts); unix_close(ptm); exit(-1); } cfmakeraw(&tattr); if (tcsetattr(pts, TCSADRAIN, &tattr) == -1) { fprintf(stderr, "tcsetattr failed: %s\n", strerror(errno)); adb_close(pts); adb_close(ptm); unix_close(pts); unix_close(ptm); exit(-1); } } Loading @@ -290,8 +290,8 @@ static int create_subproc_pty(const char* cmd, const char* arg0, dup2(pts, STDOUT_FILENO); dup2(pts, STDERR_FILENO); adb_close(pts); adb_close(ptm); unix_close(pts); unix_close(ptm); execl(cmd, cmd, arg0, arg1, nullptr); fprintf(stderr, "- exec '%s' failed: %s (%d) -\n", Loading