Home
last modified time | relevance | path

Searched refs:pos (Results 1 – 25 of 42) sorted by relevance

12

/system/core/liblog/
Dlog_event_list.c34 unsigned pos; /* Read/write position into buffer */ member
59 if ((context->pos + needed) > MAX_EVENT_PAYLOAD) { in create_android_logger()
63 context->storage[context->pos + 0] = EVENT_TYPE_LIST; in create_android_logger()
64 context->list[0] = context->pos + 1; in create_android_logger()
65 context->pos += needed; in create_android_logger()
115 if ((context->pos + needed) > MAX_EVENT_PAYLOAD) { in android_log_write_list_begin()
128 context->storage[context->pos + 0] = EVENT_TYPE_LIST; in android_log_write_list_begin()
129 context->storage[context->pos + 1] = 0; in android_log_write_list_begin()
130 context->list[context->list_nest_depth] = context->pos + 1; in android_log_write_list_begin()
132 context->pos += needed; in android_log_write_list_begin()
[all …]
/system/keymaster/
Dauthorization_set.cpp522 for (int pos = -1; (pos = find(tag, pos)) != -1;) in GetTagCount() local
528 int pos = find(tag); in GetTagValueEnum() local
529 if (pos == -1) { in GetTagValueEnum()
532 *val = elems_[pos].enumerated; in GetTagValueEnum()
539 int pos = -1; in GetTagValueEnumRep() local
541 pos = find(tag, pos); in GetTagValueEnumRep()
542 if (pos == -1) { in GetTagValueEnumRep()
547 *val = elems_[pos].enumerated; in GetTagValueEnumRep()
552 int pos = find(tag); in GetTagValueInt() local
553 if (pos == -1) { in GetTagValueInt()
[all …]
Dandroid_keymaster_test_utils.h60 int pos = set.find(tag); in contains() local
61 return pos != -1 && set[pos].enumerated == val; in contains()
67 int pos = -1; in contains() local
68 while ((pos = set.find(tag, pos)) != -1) in contains()
69 if (set[pos].enumerated == val) in contains()
76 int pos = set.find(tag); in contains() local
77 return pos != -1 && set[pos].integer == val; in contains()
82 int pos = -1; in contains() local
83 while ((pos = set.find(tag, pos)) != -1) in contains()
84 if (set[pos].integer == val) in contains()
[all …]
Drsa_keymaster1_operation.cpp50 int pos = begin_params.find(TAG_DIGEST); in Begin() local
51 if (pos == -1) in Begin()
53 begin_params[pos].enumerated = KM_DIGEST_NONE; in Begin()
55 pos = begin_params.find(TAG_PADDING); in Begin()
56 if (pos == -1) in Begin()
58 switch (begin_params[pos].enumerated) { in Begin()
63 begin_params[pos].enumerated = KM_PAD_NONE; in Begin()
Dauthorization_set_test.cpp80 int pos = set.find(TAG_ALGORITHM); in TEST() local
81 ASSERT_NE(-1, pos); in TEST()
82 EXPECT_EQ(KM_TAG_ALGORITHM, set[pos].tag); in TEST()
83 EXPECT_EQ(KM_ALGORITHM_RSA, set[pos].enumerated); in TEST()
85 pos = set.find(TAG_MAC_LENGTH); in TEST()
86 EXPECT_EQ(-1, pos); in TEST()
111 int pos = set.find(TAG_PURPOSE); in TEST() local
112 ASSERT_FALSE(pos == -1); in TEST()
113 EXPECT_EQ(KM_TAG_PURPOSE, set[pos].tag); in TEST()
114 EXPECT_EQ(KM_PURPOSE_SIGN, set[pos].enumerated); in TEST()
[all …]
Dkeymaster_enforcement.cpp151 for (size_t pos = 0; pos < auth_set.size(); ++pos) { in AuthorizeUpdateOrFinish() local
152 switch (auth_set[pos].tag) { in AuthorizeUpdateOrFinish()
159 auth_type_index = pos; in AuthorizeUpdateOrFinish()
200 for (size_t pos = 0; pos < auth_set.size(); ++pos) { in AuthorizeBegin() local
201 switch (auth_set[pos].tag) { in AuthorizeBegin()
203 auth_timeout_index = pos; in AuthorizeBegin()
206 auth_type_index = pos; in AuthorizeBegin()
209 no_auth_required_index = pos; in AuthorizeBegin()
Decdsa_keymaster1_operation.cpp51 int pos = begin_params.find(TAG_DIGEST); in Begin() local
52 if (pos == -1) in Begin()
54 begin_params[pos].enumerated = KM_DIGEST_NONE; in Begin()
/system/core/toolbox/
Dnandread.c34 loff_t pos, opos, end, bpos; in nandread_main() local
190 for (pos = start, opos = 0; pos < end; pos += mtdinfo.writesize) { in nandread_main()
193 printf("reading at %" PRIx64 "\n", pos); in nandread_main()
194 lseek64(fd, pos, SEEK_SET); in nandread_main()
197 fprintf(stderr, "short read at %" PRIx64 ", %d\n", pos, ret); in nandread_main()
201 oobbuf.start = pos; in nandread_main()
204 fprintf(stderr, "failed to read oob data at %" PRIx64 ", %d\n", pos, ret); in nandread_main()
214 bpos = pos / mtdinfo.erasesize * mtdinfo.erasesize; in nandread_main()
217 printf("badblock at %" PRIx64 "\n", pos); in nandread_main()
221 printf("ecc corrected, %u, at %" PRIx64 "\n", ecc.corrected - last_ecc.corrected, pos); in nandread_main()
[all …]
/system/netd/server/
DIptablesBaseTest.cpp71 int IptablesBaseTest::expectIptablesCommand(IptablesTarget target, int pos, in expectIptablesCommand() argument
74 if ((unsigned) pos >= sCmds.size()) { in expectIptablesCommand()
76 << pos + 1 << "/" << sCmds.size(); in expectIptablesCommand()
81 EXPECT_EQ("/system/bin/iptables -w " + cmd, sCmds[pos++]); in expectIptablesCommand()
84 EXPECT_EQ("/system/bin/ip6tables -w " + cmd, sCmds[pos++]); in expectIptablesCommand()
99 size_t pos = 0; in expectIptablesCommands() local
103 int numConsumed = expectIptablesCommand(target, pos, cmd); in expectIptablesCommands()
108 pos += numConsumed; in expectIptablesCommands()
111 EXPECT_EQ(pos, sCmds.size()); in expectIptablesCommands()
DIptablesBaseTest.h38 int expectIptablesCommand(IptablesTarget target, int pos, const std::string& cmd);
/system/extras/simpleperf/
Dread_elf_test.cpp42 auto pos = symbols.find("GlobalVar"); in CheckElfFileSymbols() local
43 ASSERT_NE(pos, symbols.end()); in CheckElfFileSymbols()
44 ASSERT_FALSE(pos->second.is_func); in CheckElfFileSymbols()
45 pos = symbols.find("GlobalFunc"); in CheckElfFileSymbols()
46 ASSERT_NE(pos, symbols.end()); in CheckElfFileSymbols()
47 ASSERT_TRUE(pos->second.is_func); in CheckElfFileSymbols()
48 ASSERT_TRUE(pos->second.is_in_text_section); in CheckElfFileSymbols()
Dsample_tree_test.cpp45 std::vector<ExpectedSampleInMap>& expected_samples, size_t* pos) { in CheckSampleCallback() argument
46 ASSERT_LT(*pos, expected_samples.size()); in CheckSampleCallback()
48 SampleMatchExpectation(sample, expected_samples[*pos], &has_error); in CheckSampleCallback()
49 ASSERT_FALSE(has_error) << "Error matching sample at pos " << *pos; in CheckSampleCallback()
50 ++*pos; in CheckSampleCallback()
74 size_t pos = 0; in VisitSampleTree() local
76 std::bind(&CheckSampleCallback, std::placeholders::_1, expected_samples, &pos)); in VisitSampleTree()
77 ASSERT_EQ(expected_samples.size(), pos); in VisitSampleTree()
Dread_apk.cpp166 size_t pos = path.find("!/"); in SplitUrlInApk() local
167 if (pos == std::string::npos) { in SplitUrlInApk()
170 return std::make_tuple(true, path.substr(0, pos), path.substr(pos + 2)); in SplitUrlInApk()
/system/extras/libfec/
Dfec_process.cpp71 uint64_t pos = offset; in process() local
87 info[i].buf = &buf[pos - offset]; in process()
88 info[i].count = (size_t)(end - pos); in process()
89 info[i].offset = pos; in process()
107 pos = end; in process()
Dfec_read.cpp412 f->pos = offset; in fec_seek()
414 if (offset < 0 && f->pos < (uint64_t)-offset) { in fec_seek()
417 } else if (offset > 0 && (uint64_t)offset > UINT64_MAX - f->pos) { in fec_seek()
422 f->pos += offset; in fec_seek()
432 f->pos = f->size + offset; in fec_seek()
445 ssize_t rc = fec_pread(f, buf, count, f->pos); in fec_read()
448 check(f->pos < UINT64_MAX - rc); in fec_read()
449 f->pos += rc; in fec_read()
/system/core/libutils/
DString16.cpp265 status_t String16::insert(size_t pos, const char16_t* chrs) in insert() argument
267 return insert(pos, chrs, strlen16(chrs)); in insert()
270 status_t String16::insert(size_t pos, const char16_t* chrs, size_t len) in insert() argument
280 if (pos > myLen) pos = myLen; in insert()
284 String8(*this).string(), pos, in insert()
292 if (pos < myLen) { in insert()
293 memmove(str+pos+len, str+pos, (myLen-pos)*sizeof(char16_t)); in insert()
295 memcpy(str+pos, chrs, len*sizeof(char16_t)); in insert()
/system/core/libsysutils/src/
DNetlinkEvent.cpp476 size_t pos = kTagLength; in parseNdUserOptMessage() local
481 buf[pos++] = ','; in parseNdUserOptMessage()
483 inet_ntop(AF_INET6, addrs + i, buf + pos, bufsize - pos); in parseNdUserOptMessage()
484 pos += strlen(buf + pos); in parseNdUserOptMessage()
486 buf[pos++] = '%'; in parseNdUserOptMessage()
487 pos += strlcpy(buf + pos, ifname, bufsize - pos); in parseNdUserOptMessage()
490 buf[pos] = '\0'; in parseNdUserOptMessage()
/system/connectivity/apmanager/
Dhostapd_monitor.cc201 size_t pos = msg.find_first_of(' ', 0); in ParseMessage() local
202 if (pos == string::npos) { in ParseMessage()
205 event = msg.substr(0, pos); in ParseMessage()
206 data = msg.substr(pos + 1); in ParseMessage()
/system/extras/bootctl/
Dbootctl.c152 static int parse_slot(int pos, int argc, char *argv[]) in parse_slot() argument
154 if (pos > argc - 1) { in parse_slot()
160 long int ret = strtol(argv[pos], NULL, 10); in parse_slot()
/system/extras/tests/iptables/qtaguid/
DsocketTag.cpp139 char *pos; in checkTag() local
169 pos = strstr(ctrl_data, buff); in checkTag()
171 if (pos && !addr) { in checkTag()
173 res = sscanf(pos - strlen("sock=1234abcd"), in checkTag()
187 return pos != NULL; in checkTag()
/system/core/crash_reporter/
Dkernel_collector_test.cc277 size_t pos = log.find(kNamePrefix); in TEST_F() local
278 ASSERT_NE(std::string::npos, pos) in TEST_F()
281 pos += strlen(kNamePrefix); in TEST_F()
282 std::string filename = log.substr(pos, std::string::npos); in TEST_F()
/system/connectivity/shill/test-scripts/
Drouting.py97 for (pos, token) in enumerate(headers):
98 colMap[token] = pos
/system/netd/tests/
Ddns_responder.cpp171 for (size_t pos = 0 ; pos < name.size() ; ) { in write() local
172 size_t dot_pos = name.find('.', pos); in write()
178 size_t len = dot_pos - pos; in write()
181 name.substr(pos, dot_pos - pos).c_str(), len); in write()
189 buffer_cur = std::copy(std::next(name.begin(), pos), in write()
192 pos = dot_pos + 1; in write()
/system/extras/f2fs_utils/
Df2fs_sparseblock.h68 int run_on_used_blocks(u64 startblock, struct f2fs_info *info, int (*func)(u64 pos, void *data), vo…
/system/extras/verity/fec/
Dimage.cpp196 memcpy(&ctx->input[ctx->pos], data, len); in process_chunk()
199 ctx->pos += len; in process_chunk()
254 ctx->pos = 0; in file_image_load()
260 if (!android::base::ReadFully(fd, &ctx->input[ctx->pos], len)) { in file_image_load()
264 ctx->pos += len; in file_image_load()

12