Home
last modified time | relevance | path

Searched refs:WriteFdExactly (Results 1 – 17 of 17) sorted by relevance

/system/core/adb/
Dadb_io.cpp61 return WriteFdExactly(fd, "OKAY", 4); in SendOkay()
65 return WriteFdExactly(fd, "FAIL", 4) && SendProtocolString(fd, reason); in SendFail()
95 bool WriteFdExactly(int fd, const void* buf, size_t len) { in WriteFdExactly() function
124 bool WriteFdExactly(int fd, const char* str) { in WriteFdExactly() function
125 return WriteFdExactly(fd, str, strlen(str)); in WriteFdExactly()
128 bool WriteFdExactly(int fd, const std::string& str) { in WriteFdExactly() function
129 return WriteFdExactly(fd, str.c_str(), str.size()); in WriteFdExactly()
140 return WriteFdExactly(fd, str); in WriteFdFmt()
Dadb_io.h67 bool WriteFdExactly(int fd, const void* buf, size_t len);
70 bool WriteFdExactly(int fd, const char* s);
71 bool WriteFdExactly(int fd, const std::string& s);
Dfile_sync_service.cpp94 return WriteFdExactly(s, &msg.stat, sizeof(msg.stat)); in do_stat()
117 if (!WriteFdExactly(s, &msg.dent, sizeof(msg.dent)) || in do_list()
118 !WriteFdExactly(s, de->d_name, d_name_length)) { in do_list()
130 return WriteFdExactly(s, &msg.dent, sizeof(msg.dent)); in do_list()
142 return WriteFdExactly(fd, &msg.data, sizeof(msg.data)) && WriteFdExactly(fd, reason); in SendSyncFail()
204 if (!WriteFdExactly(fd, &buffer[0], msg.data.size)) { in handle_send_file()
219 return WriteFdExactly(s, &msg.status, sizeof(msg.status)); in handle_send_file()
296 if (!WriteFdExactly(s, &msg.status, sizeof(msg.status))) return false; in handle_send_link()
370 if (!WriteFdExactly(s, &msg.data, sizeof(msg.data)) || !WriteFdExactly(s, &buffer[0], r)) { in do_recv()
380 return WriteFdExactly(s, &msg.data, sizeof(msg.data)); in do_recv()
Dshell_service.cpp342 WriteFdExactly(child_error_sfd.fd(), "exec '" _PATH_BSHELL "' failed: "); in ForkAndExec()
343 WriteFdExactly(child_error_sfd.fd(), strerror(errno)); in ForkAndExec()
423 WriteFdExactly(error_sfd->fd(), message); in OpenPtyChildFd()
432 WriteFdExactly(error_sfd->fd(), "tcgetattr failed: "); in OpenPtyChildFd()
433 WriteFdExactly(error_sfd->fd(), strerror(saved_errno)); in OpenPtyChildFd()
440 WriteFdExactly(error_sfd->fd(), "tcsetattr failed: "); in OpenPtyChildFd()
441 WriteFdExactly(error_sfd->fd(), strerror(saved_errno)); in OpenPtyChildFd()
698 if (WriteFdExactly(SHELL_EXIT_NOTIFY_FD, &fd, sizeof(fd))) { in WaitForExit()
726 WriteFdExactly(pipefd[1], &id, sizeof(id)); in ReportError()
727 WriteFdExactly(pipefd[1], &length, sizeof(length)); in ReportError()
[all …]
Dsysdeps_test.cpp75 ASSERT_TRUE(WriteFdExactly(fds[0], "foo", 4)); in TEST()
76 ASSERT_TRUE(WriteFdExactly(fds[1], "bar", 4)); in TEST()
137 ASSERT_TRUE(WriteFdExactly(fds[1], "foo", 4)); in TEST_F()
158 ASSERT_TRUE(WriteFdExactly(fds[1], "foo", 4)); in TEST_F()
173 ASSERT_TRUE(WriteFdExactly(fds[1], "foo", 4)); in TEST_F()
195 ASSERT_TRUE(WriteFdExactly(fds[1], "foo", 4)); in TEST_F()
227 ASSERT_TRUE(WriteFdExactly(sockets[i * 2], &i, sizeof(i))); in TEST_F()
Dadb_io_test.cpp91 ASSERT_TRUE(WriteFdExactly(tf.fd, expected, sizeof(expected))) in TEST()
106 ASSERT_TRUE(WriteFdExactly(tf.fd, buf, sizeof(buf) - 2)) << strerror(errno); in TEST()
122 ASSERT_FALSE(WriteFdExactly(fd, buf, sizeof(buf))); in TEST()
132 ASSERT_TRUE(WriteFdExactly(tf.fd, str)) << strerror(errno); in TEST()
Dremount_service.cpp111 WriteFdExactly(fd, "Not running as root. Try \"adb root\" first.\n"); in remount_service()
132 WriteFdExactly(fd, in remount_service()
149 WriteFdExactly(fd, success ? "remount succeeded\n" : "remount failed\n"); in remount_service()
Dservices.cpp72 WriteFdExactly(fd, "adbd is already running as root\n"); in restart_root_service()
78 WriteFdExactly(fd, "adbd cannot run as root in production builds\n"); in restart_root_service()
84 WriteFdExactly(fd, "restarting adbd as root\n"); in restart_root_service()
91 WriteFdExactly(fd, "adbd not running as root\n"); in restart_unroot_service()
95 WriteFdExactly(fd, "restarting adbd as non root\n"); in restart_unroot_service()
117 WriteFdExactly(fd, "restarting in USB mode\n"); in restart_usb_service()
134 WriteFdExactly(fd, "'adb root' is required for 'adb reboot sideload'.\n"); in reboot_service_impl()
188 WriteFdExactly(fd, "done"); in reconnect_service()
Dtransport_local.cpp85 if(!WriteFdExactly(t->sfd, &p->msg, sizeof(amessage) + length)) { in remote_write()
259 if (WriteFdExactly(fd, _accept_req, strlen(_accept_req))) { in qemu_socket_thread()
270 if (!WriteFdExactly(fd, _start_req, strlen(_start_req))) { in qemu_socket_thread()
Dfdevent_test.h54 ASSERT_TRUE(WriteFdExactly(dummy, "", 1)); in TerminateThread()
Dframebuffer_service.cpp168 if(!WriteFdExactly(fd, &fbinfo, sizeof(fbinfo))) goto done; in framebuffer_service()
176 if(!WriteFdExactly(fd, buf, bsize)) goto done; in framebuffer_service()
Dshell_service_protocol.cpp61 return WriteFdExactly(fd_, buffer_, kHeaderSize + length); in Write()
Dconsole.cpp125 if (!WriteFdExactly(fd, commands)) { in adb_send_emulator_command()
Dfdevent_test.cpp130 ASSERT_TRUE(WriteFdExactly(writer, read_buffer.c_str(), read_buffer.size())); in TEST_F()
Dfile_sync_client.cpp160 return WriteFdExactly(fd, &buf[0], buf.size()); in SendRequest()
406 if (!WriteFdExactly(fd, data, data_length)) { in WriteOrDie()
567 if (!WriteFdExactly(lfd, buffer, msg.data.size)) { in sync_recv()
Dsocket_test.cpp93 ASSERT_TRUE(WriteFdExactly(first[0], &read_buffer[0], read_buffer.size())); in TEST_F()
Dcommandline.cpp601 if (!WriteFdExactly(args->write_fd, buffer_ptr, r)) { in stdin_read_thread_loop()
838 if (!WriteFdExactly(fd, ptr, xfer)) { in adb_download_buffer()
946 if(!WriteFdExactly(fd, start, to_write)) { in adb_sideload_host()
1114 WriteFdExactly(STDOUT_FILENO, buf, sizeof(buf) - bytes_left); in adb_root()