/system/netd/resolv/ |
D | res_mkquery.cpp | 112 u_char *cp, *ep; in res_nmkquery() local 130 cp = buf + HFIXEDSZ; in res_nmkquery() 143 if (ep - cp < QFIXEDSZ) return (-1); in res_nmkquery() 144 if ((n = dn_comp(dname, cp, ep - cp - QFIXEDSZ, dnptrs, lastdnptr)) < 0) return (-1); in res_nmkquery() 145 cp += n; in res_nmkquery() 146 *reinterpret_cast<uint16_t*>(cp) = htons(type); in res_nmkquery() 147 cp += INT16SZ; in res_nmkquery() 148 *reinterpret_cast<uint16_t*>(cp) = htons(cl); in res_nmkquery() 149 cp += INT16SZ; in res_nmkquery() 155 if ((ep - cp) < RRFIXEDSZ) return (-1); in res_nmkquery() [all …]
|
D | res_init.cpp | 132 char *cp, **pp; in res_vinit() local 170 (cp = strchr(buf, '.')) != NULL) in res_vinit() 171 strcpy(statp->defdname, cp + 1); in res_vinit() 180 for (cp = statp->defdname; *cp; cp++) dots += (*cp == '.'); in res_vinit() 182 cp = statp->defdname; in res_vinit() 185 cp = strchr(cp, '.') + 1; /* we know there is one */ in res_vinit() 186 *pp++ = cp; in res_vinit() 194 if ((cp = getenv("RES_OPTIONS")) != NULL) res_setoptions(statp, cp, "env"); in res_vinit() 203 const char* cp = options; in res_setoptions() local 209 while (*cp) { in res_setoptions() [all …]
|
D | gethnamaddr.cpp | 135 BOUNDS_CHECK(cp, x); \ 136 cp += (x); \ 148 const u_char* cp; in getanswer() local 189 cp = answer->buf; in getanswer() 193 n = dn_expand(answer->buf, eom, cp, bp, (int) (ep - bp)); in getanswer() 213 while (ancount-- > 0 && cp < eom && !had_error) { in getanswer() 214 n = dn_expand(answer->buf, eom, cp, bp, (int) (ep - bp)); in getanswer() 219 cp += n; /* name */ in getanswer() 220 BOUNDS_CHECK(cp, 3 * INT16SZ + INT32SZ); in getanswer() 221 int type = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in getanswer() [all …]
|
D | getaddrinfo.cpp | 593 const char *cp, *scope, *addr; in explore_numeric_scope() local 613 cp = strchr(hostname, SCOPE_DELIMITER); in explore_numeric_scope() 614 if (cp == NULL) return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope() 622 hostname2[cp - hostname] = '\0'; in explore_numeric_scope() 624 scope = cp + 1; in explore_numeric_scope() 816 BOUNDS_CHECK(cp, x); \ 817 cp += (x); \ 836 const u_char* cp; in getanswer() local 871 cp = answer->buf; in getanswer() 877 n = dn_expand(answer->buf, eom, cp, bp, ep - bp); in getanswer() [all …]
|
D | res_query.cpp | 211 const char *cp, *const *domain; in res_nsearch() local 223 for (cp = name; *cp != '\0'; cp++) dots += (*cp == '.'); in res_nsearch() 225 if (cp > name && *--cp == '.') trailing_dot++; in res_nsearch()
|
D | sethostent.cpp | 106 char** cp; in _hf_gethtbyname2() local 107 for (cp = hp->h_aliases; *cp != NULL; cp++) in _hf_gethtbyname2() 108 if (strcasecmp(*cp, name) == 0) break; in _hf_gethtbyname2() 110 if (*cp == NULL) continue; in _hf_gethtbyname2()
|
D | res_debug.cpp | 196 const u_char* cp = ns_rr_rdata(rr); in do_section() local 200 GETSHORT(optcode, cp); in do_section() 201 GETSHORT(optlen, cp); in do_section() 210 p = dbprint(p, end, "%02x ", cp[i]); in do_section() 214 p = dbprint(p, end, "%c", isprint(cp[i]) ? cp[i] : '.'); in do_section() 224 p = dbprint(p, end, "%02x ", cp[i]); in do_section() 228 p = dbprint(p, end, "%c", isprint(cp[i]) ? cp[i] : '.'); in do_section() 234 cp += optlen; in do_section()
|
/system/core/logd/ |
D | LogKlog.cpp | 299 const char* cp = nullptr; in sniffTime() local 301 cp = now.strptime(buf, "[ %s.%q]"); // can index beyond buffer bounds in sniffTime() 302 if (cp && (cp > &buf[len - 1])) cp = nullptr; in sniffTime() 304 if (cp) { in sniffTime() 305 len -= cp - buf; in sniffTime() 306 if ((len > 0) && isspace(*cp)) { in sniffTime() 307 ++cp; in sniffTime() 310 buf = cp; in sniffTime() 315 if (((b = android::strnstr(cp, len, suspendStr))) && in sniffTime() 316 (((b += strlen(suspendStr)) - cp) < len)) { in sniffTime() [all …]
|
D | LogReader.cpp | 75 char* cp = strstr(buffer, _tail); in onDataAvailable() local 76 if (cp) { in onDataAvailable() 77 tail = atol(cp + sizeof(_tail) - 1); in onDataAvailable() 82 cp = strstr(buffer, _start); in onDataAvailable() 83 if (cp) { in onDataAvailable() 85 start.strptime(cp + sizeof(_start) - 1, "%s.%q"); in onDataAvailable() 90 cp = strstr(buffer, _timeout); in onDataAvailable() 91 if (cp) { in onDataAvailable() 92 timeout = atol(cp + sizeof(_timeout) - 1) * NS_PER_SEC + in onDataAvailable() 98 cp = strstr(buffer, _logIds); in onDataAvailable() [all …]
|
D | LogTags.cpp | 63 char* cp; in sniffUid() local 64 unsigned long Uid = strtoul(comment + 4, &cp, 10); in sniffUid() 65 if ((cp > endp) || (Uid >= INT_MAX)) return AID_ROOT; in sniffUid() 198 char* cp = (char*)content.c_str(); in ReadFileEventLogTags() local 199 char* endp = cp + content.length(); in ReadFileEventLogTags() 207 char* lineStart = cp; in ReadFileEventLogTags() 208 while (cp < endp) { in ReadFileEventLogTags() 209 if (*cp == '\n') { in ReadFileEventLogTags() 210 lineStart = cp; in ReadFileEventLogTags() 212 if (*cp == '#') { in ReadFileEventLogTags() [all …]
|
D | LogAudit.cpp | 194 char* cp; in logPrint() local 198 while ((cp = strchr(str, '\n'))) { in logPrint() 199 *cp = ' '; in logPrint() 202 while ((cp = strstr(str, " "))) { in logPrint() 203 memmove(cp, cp + 1, strlen(cp + 1) + 1); in logPrint() 211 cp = pidptr + sizeof(pid_str) - 1; in logPrint() 213 while (isdigit(*cp)) { in logPrint() 214 pid = (pid * 10) + (*cp - '0'); in logPrint() 215 ++cp; in logPrint() 221 memmove(pidptr, cp, strlen(cp) + 1); in logPrint() [all …]
|
D | main.cpp | 168 const char* cp = strcasestr(prop, flag); in check_flag() local 169 if (!cp) { in check_flag() 174 if ((cp != prop) && !strchr(sep, cp[-1])) { in check_flag() 177 cp += strlen(flag); in check_flag() 178 return !*cp || !!strchr(sep, *cp); in check_flag()
|
/system/core/liblog/ |
D | event_tag_map.cpp | 234 static const char* endOfTag(const char* cp) { in endOfTag() argument 235 while (*cp && (isalnum(*cp) || strchr("_.-@,", *cp))) ++cp; in endOfTag() 236 return cp; in endOfTag() 254 const char* cp = ep; in scanTagLine() local 255 if (cp == pData) { in scanTagLine() 272 while ((*++cp != '\n') && isspace(*cp)) { in scanTagLine() 275 if (*cp == '\n') { in scanTagLine() 283 const char* tag = cp; in scanTagLine() 284 cp = endOfTag(cp); in scanTagLine() 285 size_t tagLen = cp - tag; in scanTagLine() [all …]
|
D | log_time.cpp | 54 char* cp; in strptime() local 55 for (char* f = cp = fmt;; ++cp) { in strptime() 56 if (!*cp) { in strptime() 57 if (f != cp) { in strptime() 62 if (*cp != '%') { in strptime() 65 char* e = cp; in strptime() 69 *cp = '\0'; in strptime() 98 *cp = '\0'; in strptime() 117 f = cp = e; in strptime()
|
D | logd_reader.cpp | 132 char* cp; in send_log_msg() local 150 cp = buf; in send_log_msg() 151 while ((ret = TEMP_FAILURE_RETRY(read(sock, cp, len))) > 0) { in send_log_msg() 159 cp += ret; in send_log_msg() 279 char* cp = buf; in logdGetStats() local 283 n = snprintf(cp, remaining, "getStatistics"); in logdGetStats() 286 cp += n; in logdGetStats() 289 n = snprintf(cp, remaining, " %d", logger->logId); in logdGetStats() 292 cp += n; in logdGetStats() 296 snprintf(cp, remaining, " pid=%u", logger_list->pid); in logdGetStats() [all …]
|
D | pmsg_writer.cpp | 193 const char* cp = buf + len; in strnrchr() local 194 while ((--cp > buf) && (*cp != c)) in strnrchr() 196 if (cp <= buf) { in strnrchr() 199 return cp; in strnrchr() 208 char *cp, *slash; in __android_log_pmsg_file_write() local 222 cp = strdup(filename); in __android_log_pmsg_file_write() 223 if (!cp) { in __android_log_pmsg_file_write() 227 tag = cp; in __android_log_pmsg_file_write() 228 slash = strrchr(cp, '/'); in __android_log_pmsg_file_write() 231 slash = strrchr(cp, '/'); in __android_log_pmsg_file_write() [all …]
|
D | logprint.cpp | 329 char* cp = getenv(tz); in android_log_formatFromString() local 330 if (cp) { in android_log_formatFromString() 331 cp = strdup(cp); in android_log_formatFromString() 343 if (cp) { in android_log_formatFromString() 344 setenv(tz, cp, 1); in android_log_formatFromString() 353 free(cp); in android_log_formatFromString() 601 static bool findChar(const char** cp, size_t* len, int c) { in findChar() argument 602 while ((*len) && isspace(*(*cp))) { in findChar() 603 ++(*cp); in findChar() 607 if ((*len) && (*(*cp) == c)) { in findChar() [all …]
|
D | pmsg_reader.cpp | 325 const char *prev = NULL, *last = NULL, *cp = prefix; in __android_log_pmsg_file_read() local 326 while ((cp = strpbrk(cp, "/:"))) { in __android_log_pmsg_file_read() 328 last = cp; in __android_log_pmsg_file_read() 329 cp = cp + 1; in __android_log_pmsg_file_read() 339 const char* cp; in __android_log_pmsg_file_read() local 357 for (cp = msg + sizeof(prio); *cp && isprint(*cp) && !isspace(*cp) && --len; ++cp) { in __android_log_pmsg_file_read() 358 if (*cp == ':') { in __android_log_pmsg_file_read() 362 split = cp; in __android_log_pmsg_file_read() 365 if (*cp || !split) { in __android_log_pmsg_file_read() 443 cp = strpbrk(names->name, numbers); in __android_log_pmsg_file_read() [all …]
|
D | properties.cpp | 399 const char* cp = strcasestr(prop, flag); in check_flag() local 400 if (!cp) { in check_flag() 405 if ((cp != prop) && !strchr(sep, cp[-1])) { in check_flag() 408 cp += strlen(flag); in check_flag() 409 return !*cp || !!strchr(sep, *cp); in check_flag() 551 char* cp; in property_get_size_from_cache() local 552 unsigned long value = strtoul(cache->property, &cp, 10); in property_get_size_from_cache() 554 switch (*cp) { in property_get_size_from_cache()
|
/system/extras/f2fs_utils/ |
D | f2fs_sparseblock.c | 77 static void dbg_print_raw_ckpt_struct(struct f2fs_checkpoint *cp) in dbg_print_raw_ckpt_struct() argument 84 D_DISP_u64(cp, checkpoint_ver); in dbg_print_raw_ckpt_struct() 85 D_DISP_u64(cp, user_block_count); in dbg_print_raw_ckpt_struct() 86 D_DISP_u64(cp, valid_block_count); in dbg_print_raw_ckpt_struct() 87 D_DISP_u32(cp, rsvd_segment_count); in dbg_print_raw_ckpt_struct() 88 D_DISP_u32(cp, overprov_segment_count); in dbg_print_raw_ckpt_struct() 89 D_DISP_u32(cp, free_segment_count); in dbg_print_raw_ckpt_struct() 91 D_DISP_u32(cp, alloc_type[CURSEG_HOT_NODE]); in dbg_print_raw_ckpt_struct() 92 D_DISP_u32(cp, alloc_type[CURSEG_WARM_NODE]); in dbg_print_raw_ckpt_struct() 93 D_DISP_u32(cp, alloc_type[CURSEG_COLD_NODE]); in dbg_print_raw_ckpt_struct() [all …]
|
/system/core/logd/tests/ |
D | logd_test.cpp | 103 static char* find_benchmark_spam(char* cp) { in find_benchmark_spam() argument 115 benchmark = strstr(cp, signature); in find_benchmark_spam() 119 cp = benchmark + sizeof(signature); in find_benchmark_spam() 120 while (isspace(*cp)) { in find_benchmark_spam() 121 ++cp; in find_benchmark_spam() 123 benchmark = cp; in find_benchmark_spam() 133 while (isdigit(*cp)) { in find_benchmark_spam() 134 ++cp; in find_benchmark_spam() 136 while (isspace(*cp)) { in find_benchmark_spam() 137 ++cp; in find_benchmark_spam() [all …]
|
/system/core/libcutils/ |
D | android_get_control_file.cpp | 56 char *cp = key; in __android_get_control_from_env() local 57 while (*cp) { in __android_get_control_from_env() 58 if (!isalnum(*cp)) *cp = '_'; in __android_get_control_from_env() 59 ++cp; in __android_get_control_from_env()
|
/system/sepolicy/ |
D | property_contexts.mk | 24 $(hide) cp -f $< $@ 52 $(hide) cp -f $< $@ 81 $(hide) cp -f $< $@ 112 $(hide) cp -f $< $@ 131 $(hide) cp -f $< $@ 144 $(hide) cp -f $< $@ 157 $(hide) cp -f $< $@ 170 $(hide) cp -f $< $@
|
/system/core/libutils/ |
D | String8.cpp | 517 const char* cp; in getPathLeaf() local 520 cp = strrchr(buf, OS_PATH_SEPARATOR); in getPathLeaf() 521 if (cp == nullptr) in getPathLeaf() 524 return String8(cp+1); in getPathLeaf() 529 const char* cp; in getPathDir() local 532 cp = strrchr(str, OS_PATH_SEPARATOR); in getPathDir() 533 if (cp == nullptr) in getPathDir() 536 return String8(str, cp - str); in getPathDir() 541 const char* cp; in walkPath() local 545 cp = strchr(buf, OS_PATH_SEPARATOR); in walkPath() [all …]
|
/system/core/logcat/ |
D | logcat.cpp | 625 static char* parseTime(log_time& t, const char* cp) { in parseTime() argument 626 char* ep = t.strptime(cp, "%m-%d %H:%M:%S.%q"); in parseTime() 628 ep = t.strptime(cp, "%Y-%m-%d %H:%M:%S.%q"); in parseTime() 630 return t.strptime(cp, "%s.%q"); in parseTime() 966 char* cp = parseTime(tail_time, optarg); in __logcat() local 967 if (!cp) { in __logcat() 972 if (*cp) { in __logcat() 973 char ch = *cp; in __logcat() 974 *cp = '\0'; in __logcat() 977 c, optarg, ch, cp + 1); in __logcat() [all …]
|