/system/core/adb/ |
D | sockets.cpp | 61 asocket* s; in find_local_socket() local 65 for (s = local_socket_list.next; s != &local_socket_list; s = s->next) { in find_local_socket() 66 if (s->id != local_id) { in find_local_socket() 69 if (peer_id == 0 || (s->peer && s->peer->id == peer_id)) { in find_local_socket() 70 result = s; in find_local_socket() 78 static void insert_local_socket(asocket* s, asocket* list) { in insert_local_socket() argument 79 s->next = list; in insert_local_socket() 80 s->prev = s->next->prev; in insert_local_socket() 81 s->prev->next = s; in insert_local_socket() 82 s->next->prev = s; in insert_local_socket() [all …]
|
D | jdwp_service.cpp | 455 jdwp_control_event(int s, unsigned events, void* user); 465 int s; in jdwp_control_init() local 479 s = socket( AF_UNIX, SOCK_STREAM, 0 ); in jdwp_control_init() 480 if (s < 0) { in jdwp_control_init() 488 if (bind(s, reinterpret_cast<sockaddr*>(&addr), addrlen) < 0) { in jdwp_control_init() 491 adb_close(s); in jdwp_control_init() 495 if ( listen(s, 4) < 0 ) { in jdwp_control_init() 498 adb_close(s); in jdwp_control_init() 502 control->listen_socket = s; in jdwp_control_init() 504 control->fde = fdevent_create(s, jdwp_control_event, control); in jdwp_control_init() [all …]
|
D | file_sync_service.cpp | 82 static bool do_stat(int s, const char* path) { in do_stat() argument 94 return WriteFdExactly(s, &msg.stat, sizeof(msg.stat)); in do_stat() 97 static bool do_list(int s, const char* path) { in do_list() argument 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() 149 static bool handle_send_file(int s, const char* path, uid_t uid, in handle_send_file() argument 159 SendSyncFailErrno(s, "secure_mkdirs failed"); in handle_send_file() 168 SendSyncFailErrno(s, "couldn't create file"); in handle_send_file() 172 SendSyncFailErrno(s, "fchown failed"); in handle_send_file() [all …]
|
/system/extras/taskstats/ |
D | taskstats.c | 135 const struct taskstats* s = &stats->stats; in print_task_stats() local 138 printf("%-25s%d\n", "Stats version:", s->version); in print_task_stats() 139 printf("%-25s%d\n", "Exit code:", s->ac_exitcode); in print_task_stats() 140 printf("%-25s0x%x\n", "Flags:", s->ac_flag); in print_task_stats() 141 printf("%-25s%d\n", "Nice value:", s->ac_nice); in print_task_stats() 142 printf("%-25s%s\n", "Command name:", s->ac_comm); in print_task_stats() 143 printf("%-25s%d\n", "Scheduling discipline:", s->ac_sched); in print_task_stats() 144 printf("%-25s%d\n", "UID:", s->ac_uid); in print_task_stats() 145 printf("%-25s%d\n", "GID:", s->ac_gid); in print_task_stats() 146 printf("%-25s%d\n", "PID:", s->ac_pid); in print_task_stats() [all …]
|
/system/core/libpixelflinger/codeflinger/ |
D | load_store.cpp | 27 void GGLAssembler::store(const pointer_t& addr, const pixel_t& s, uint32_t flags) in store() argument 33 if (inc) STR(AL, s.reg, addr.reg, immed12_post(4)); in store() 34 else STR(AL, s.reg, addr.reg); in store() 39 STRB(AL, s.reg, addr.reg, immed12_pre(0)); in store() 40 MOV(AL, 0, s.reg, reg_imm(s.reg, ROR, 8)); in store() 41 STRB(AL, s.reg, addr.reg, immed12_pre(1)); in store() 42 MOV(AL, 0, s.reg, reg_imm(s.reg, ROR, 8)); in store() 43 STRB(AL, s.reg, addr.reg, immed12_pre(2)); in store() 44 if (!(s.flags & CORRUPTIBLE)) { in store() 45 MOV(AL, 0, s.reg, reg_imm(s.reg, ROR, 16)); in store() [all …]
|
/system/extras/tests/net_test/ |
D | ping6_test.py | 211 def assertValidPingResponse(self, s, data): argument 212 family = s.family 215 rcvd, src = s.recvfrom(32768) 231 self.fail("Unknown socket address family %d" * s.family) 267 s = net_test.IPv4PingSocket() 268 self.assertRaisesErrno(errno.EDESTADDRREQ, s.send, net_test.IPV4_PING) 271 s = net_test.IPv6PingSocket() 272 self.assertRaisesErrno(errno.EDESTADDRREQ, s.send, net_test.IPV6_PING) 275 s = net_test.IPv4PingSocket() 276 s.connect(("127.0.0.1", 55)) [all …]
|
/system/core/libsparse/ |
D | sparse.c | 32 struct sparse_file *s = calloc(sizeof(struct sparse_file), 1); in sparse_file_new() local 33 if (!s) { in sparse_file_new() 37 s->backed_block_list = backed_block_list_new(block_size); in sparse_file_new() 38 if (!s->backed_block_list) { in sparse_file_new() 39 free(s); in sparse_file_new() 43 s->block_size = block_size; in sparse_file_new() 44 s->len = len; in sparse_file_new() 46 return s; in sparse_file_new() 49 void sparse_file_destroy(struct sparse_file *s) in sparse_file_destroy() argument 51 backed_block_list_destroy(s->backed_block_list); in sparse_file_destroy() [all …]
|
D | sparse_read.c | 56 char *s = ""; in verbose_error() local 79 s = " at "; in verbose_error() 84 sparse_print_verbose("EOF while reading file%s%s\n", s, at); in verbose_error() 88 sparse_print_verbose("Invalid sparse file format%s%s\n", s, at); in verbose_error() 91 s, at); in verbose_error() 93 sparse_print_verbose("Unknown error %d%s%s\n", err, s, at); in verbose_error() 101 static int process_raw_chunk(struct sparse_file *s, unsigned int chunk_size, in process_raw_chunk() argument 107 unsigned int len = blocks * s->block_size; in process_raw_chunk() 109 if (chunk_size % s->block_size != 0) { in process_raw_chunk() 113 if (chunk_size / s->block_size != blocks) { in process_raw_chunk() [all …]
|
/system/core/libcutils/ |
D | socket_network_client_unix.c | 32 static int toggle_O_NONBLOCK(int s) { in toggle_O_NONBLOCK() argument 33 int flags = fcntl(s, F_GETFL); in toggle_O_NONBLOCK() 34 if (flags == -1 || fcntl(s, F_SETFL, flags ^ O_NONBLOCK) == -1) { in toggle_O_NONBLOCK() 35 close(s); in toggle_O_NONBLOCK() 38 return s; in toggle_O_NONBLOCK() 72 int s = socket(family, type, protocol); in socket_network_client_timeout() local 73 if (s == -1 || toggle_O_NONBLOCK(s) == -1) return -1; in socket_network_client_timeout() 75 int rc = connect(s, (const struct sockaddr*) &addr, addr_len); in socket_network_client_timeout() 77 return toggle_O_NONBLOCK(s); in socket_network_client_timeout() 79 close(s); in socket_network_client_timeout() [all …]
|
D | socket_local_server_unix.c | 55 int socket_local_server_bind(int s, const char *name, int namespaceId) argument 80 setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &n, sizeof(n)); 82 if(bind(s, (struct sockaddr *) &addr, alen) < 0) { 86 return s; 100 int s; local 102 s = socket(AF_LOCAL, type, 0); 103 if (s < 0) return -1; 105 err = socket_local_server_bind(s, name, namespace); 108 close(s); 115 ret = listen(s, LISTEN_BACKLOG); [all …]
|
D | socket_inaddr_any_server_unix.c | 36 int s, n; in socket_inaddr_any_server() local 43 s = socket(AF_INET6, type, 0); in socket_inaddr_any_server() 44 if (s < 0) return -1; in socket_inaddr_any_server() 47 setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (const char *) &n, sizeof(n)); in socket_inaddr_any_server() 49 if (bind(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) { in socket_inaddr_any_server() 50 close(s); in socket_inaddr_any_server() 57 ret = listen(s, LISTEN_BACKLOG); in socket_inaddr_any_server() 60 close(s); in socket_inaddr_any_server() 65 return s; in socket_inaddr_any_server()
|
D | socket_loopback_server_unix.c | 38 int s, n; in socket_loopback_server() local 45 s = socket(AF_INET, type, 0); in socket_loopback_server() 46 if(s < 0) return -1; in socket_loopback_server() 49 setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (const char *) &n, sizeof(n)); in socket_loopback_server() 51 if(bind(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) { in socket_loopback_server() 52 close(s); in socket_loopback_server() 59 ret = listen(s, LISTEN_BACKLOG); in socket_loopback_server() 62 close(s); in socket_loopback_server() 67 return s; in socket_loopback_server()
|
/system/tools/aidl/tests/ |
D | aidl_test_client_primitives.cpp | 51 bool ConfirmPrimitiveRepeat(const sp<ITestService>& s) { in ConfirmPrimitiveRepeat() argument 54 if (!RepeatPrimitive(s, &ITestService::RepeatBoolean, true) || in ConfirmPrimitiveRepeat() 55 !RepeatPrimitive(s, &ITestService::RepeatByte, int8_t{-128}) || in ConfirmPrimitiveRepeat() 56 !RepeatPrimitive(s, &ITestService::RepeatChar, char16_t{'A'}) || in ConfirmPrimitiveRepeat() 57 !RepeatPrimitive(s, &ITestService::RepeatInt, int32_t{1 << 30}) || in ConfirmPrimitiveRepeat() 58 !RepeatPrimitive(s, &ITestService::RepeatLong, int64_t{1ll << 60}) || in ConfirmPrimitiveRepeat() 59 !RepeatPrimitive(s, &ITestService::RepeatFloat, float{1.0f/3.0f}) || in ConfirmPrimitiveRepeat() 60 !RepeatPrimitive(s, &ITestService::RepeatDouble, double{1.0/3.0}) || in ConfirmPrimitiveRepeat() 62 s, &ITestService::RepeatInt, ITestService::TEST_CONSTANT) || in ConfirmPrimitiveRepeat() 64 s, &ITestService::RepeatInt, ITestService::TEST_CONSTANT2) || in ConfirmPrimitiveRepeat() [all …]
|
/system/core/libpixelflinger/ |
D | buffer.cpp | 26 static void read_pixel(const surface_t* s, context_t* c, 28 static void write_pixel(const surface_t* s, context_t* c, 30 static void readRGB565(const surface_t* s, context_t* c, 32 static void readABGR8888(const surface_t* s, context_t* c, 35 static uint32_t logic_op(int op, uint32_t s, uint32_t d); 73 static void pick_read_write(surface_t* s) in pick_read_write() argument 76 switch (s->format) { in pick_read_write() 77 case GGL_PIXEL_FORMAT_RGBA_8888: s->read = readABGR8888; break; in pick_read_write() 78 case GGL_PIXEL_FORMAT_RGB_565: s->read = readRGB565; break; in pick_read_write() 79 default: s->read = read_pixel; break; in pick_read_write() [all …]
|
/system/core/cpio/ |
D | mkbootfs.c | 57 static void fix_stat(const char *path, struct stat *s) in fix_stat() argument 71 s->st_uid = p->uid; in fix_stat() 72 s->st_gid = p->gid; in fix_stat() 73 s->st_mode = p->mode | (s->st_mode & ~07777); in fix_stat() 77 s->st_uid = empty_path_config->uid; in fix_stat() 78 s->st_gid = empty_path_config->gid; in fix_stat() 79 s->st_mode = empty_path_config->mode | (s->st_mode & ~07777); in fix_stat() 82 unsigned st_mode = s->st_mode; in fix_stat() 83 fs_config(path, S_ISDIR(s->st_mode), target_out_path, in fix_stat() 84 &s->st_uid, &s->st_gid, &st_mode, &capabilities); in fix_stat() [all …]
|
/system/bt/osi/src/socket_utils/ |
D | socket_local_server.c | 42 int osi_socket_local_server_bind(int s, const char *name, int namespaceId) { argument 66 setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &n, sizeof(n)); 68 if (bind(s, (struct sockaddr *)&addr, alen) < 0) { 72 return s; 82 int s; local 84 s = socket(AF_LOCAL, type, 0); 85 if (s < 0) return -1; 87 err = osi_socket_local_server_bind(s, name, namespace); 90 close(s); 97 ret = listen(s, LISTEN_BACKLOG); [all …]
|
/system/core/base/ |
D | strings.cpp | 31 std::vector<std::string> Split(const std::string& s, in Split() argument 40 found = s.find_first_of(delimiters, base); in Split() 41 result.push_back(s.substr(base, found - base)); in Split() 43 } while (found != s.npos); in Split() 48 std::string Trim(const std::string& s) { in Trim() argument 51 if (s.size() == 0) { in Trim() 56 size_t end_index = s.size() - 1; in Trim() 59 while (start_index < s.size()) { in Trim() 60 if (!isspace(s[start_index])) { in Trim() 68 if (!isspace(s[end_index])) { in Trim() [all …]
|
D | file_test.cpp | 30 std::string s("hello"); in TEST() local 32 ASSERT_FALSE(android::base::ReadFileToString("/proc/does-not-exist", &s)); in TEST() 34 EXPECT_EQ("", s); // s was cleared. in TEST() 42 std::string s; in TEST() local 43 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) in TEST() 45 EXPECT_EQ("abc", s); in TEST() 62 std::string s; in TEST() local 63 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) in TEST() 65 EXPECT_EQ("abc", s); in TEST() 76 std::string s; in TEST() local [all …]
|
/system/extras/simpleperf/ |
D | build_id.h | 42 explicit BuildId(const std::string& s) : BuildId() { in BuildId() argument 43 for (size_t i = 0; i < s.size() && i < BUILD_ID_SIZE * 2; i += 2) { in BuildId() 47 if (s[j] >= '0' && s[j] <= '9') { in BuildId() 48 ch |= s[j] - '0'; in BuildId() 49 } else if (s[j] >= 'a' && s[j] <= 'f') { in BuildId() 50 ch |= s[j] - 'a' + 10; in BuildId() 51 } else if (s[j] >= 'A' && s[j] <= 'F') { in BuildId() 52 ch |= s[j] - 'A' + 10; in BuildId() 64 std::string s = "0x"; in ToString() local 66 s += android::base::StringPrintf("%02x", data_[i]); in ToString() [all …]
|
/system/core/init/ |
D | util_test.cpp | 23 std::string s("hello"); in TEST() local 25 EXPECT_FALSE(read_file("/proc/does-not-exist", &s)); in TEST() 27 EXPECT_EQ("", s); // s was cleared. in TEST() 31 std::string s("hello"); in TEST() local 32 EXPECT_TRUE(read_file("/proc/version", &s)); in TEST() 33 EXPECT_GT(s.length(), 6U); in TEST() 34 EXPECT_EQ('\n', s[s.length() - 1]); in TEST() 35 s[5] = 0; in TEST() 36 EXPECT_STREQ("Linux", s.c_str()); in TEST()
|
D | ueventd_parser.cpp | 56 static int lookup_keyword(const char *s) in lookup_keyword() argument 58 switch (*s++) { in lookup_keyword() 60 if (!strcmp(s, "evname")) return K_devname; in lookup_keyword() 61 if (!strcmp(s, "irname")) return K_dirname; in lookup_keyword() 64 if (!strcmp(s, "ubsystem")) return K_subsystem; in lookup_keyword() 87 struct ueventd_subsystem *s; in ueventd_subsystem_find_by_name() local 90 s = node_to_item(node, struct ueventd_subsystem, slist); in ueventd_subsystem_find_by_name() 91 if (!strcmp(s->name, name)) { in ueventd_subsystem_find_by_name() 92 return s; in ueventd_subsystem_find_by_name() 104 ueventd_subsystem* s = ueventd_subsystem_find_by_name(args[1]); in parse_subsystem() local [all …]
|
/system/core/logd/ |
D | LogKlog.cpp | 46 static char *is_prio(char *s, size_t len) { in is_prio() argument 47 if (!len || !isdigit(*s++)) { in is_prio() 54 while (((c = *s++)) && (++priolen <= max_prio_len)) { in is_prio() 56 return ((c == '>') && (*s == '[')) ? s : NULL; in is_prio() 63 static char *is_timestamp(char *s, size_t len) { in is_timestamp() argument 64 while (len && (*s == ' ')) { in is_timestamp() 65 ++s; in is_timestamp() 68 if (!len || !isdigit(*s++)) { in is_timestamp() 74 while (len && ((c = *s++))) { in is_timestamp() 79 return ((c == ']') && !first_period && (*s == ' ')) ? s : NULL; in is_timestamp() [all …]
|
/system/tools/aidl/ |
D | options.cpp | 83 const char* s = argv[i]; in Parse() local 84 const size_t len = strlen(s); in Parse() 85 if (s[0] != '-') { in Parse() 89 fprintf(stderr, "unknown option (%d): %s\n", i, s); in Parse() 93 if (s[1] == 'I') { in Parse() 95 options->import_paths_.push_back(s + 2); in Parse() 100 } else if (s[1] == 'd') { in Parse() 102 options->dep_file_name_ = s + 2; in Parse() 107 } else if (strcmp(s, "-a") == 0) { in Parse() 109 } else if (s[1] == 'p') { in Parse() [all …]
|
/system/bt/osi/src/ |
D | compat.c | 72 const char *s = src; in strlcpy() local 78 if ((*d++ = *s++) == '\0') in strlcpy() 87 while (*s++) in strlcpy() 91 return(s - src - 1); /* count does not include NUL */ in strlcpy() 107 const char *s = src; in strlcat() local 118 return (dlen + strlen(s)); in strlcat() 120 while (*s != '\0') { in strlcat() 122 *d++ = *s; in strlcat() 126 s++; in strlcat() 131 return (dlen + (s - src)); /* count does not include NUL */ in strlcat()
|
/system/core/base/include/android-base/ |
D | parseint.h | 32 bool ParseUint(const char* s, T* out, 34 int base = (s[0] == '0' && s[1] == 'x') ? 16 : 10; 37 unsigned long long int result = strtoull(s, &end, base); 38 if (errno != 0 || s == end || *end != '\0') { 53 bool ParseInt(const char* s, T* out, 56 int base = (s[0] == '0' && s[1] == 'x') ? 16 : 10; 59 long long int result = strtoll(s, &end, base); 60 if (errno != 0 || s == end || *end != '\0') {
|