Home
last modified time | relevance | path

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

123456

/system/security/keystore/include/keystore/
Dkeystore_hidl_support.h100 auto pos = result.begin(); in authToken2HidlVec() local
101 *pos++ = 0; // Version byte in authToken2HidlVec()
102 pos = copy_bytes_to_iterator(token.challenge, pos); in authToken2HidlVec()
103 pos = copy_bytes_to_iterator(token.userId, pos); in authToken2HidlVec()
104 pos = copy_bytes_to_iterator(token.authenticatorId, pos); in authToken2HidlVec()
105 pos = copy_bytes_to_iterator(token.authenticatorType, pos); in authToken2HidlVec()
106 pos = copy_bytes_to_iterator(token.timestamp, pos); in authToken2HidlVec()
107 pos = std::copy(token.hmac.data(), token.hmac.data() + token.hmac.size(), pos); in authToken2HidlVec()
132 auto pos = buffer.begin(); in hidlVec2Km3AuthToken() local
133 ++pos; // skip first byte in hidlVec2Km3AuthToken()
[all …]
/system/keymaster/tests/
Dandroid_keymaster_test_utils.h44 int pos = set.find(tag); in contains() local
45 return pos != -1 && static_cast<KeymasterEnum>(set[pos].enumerated) == val; in contains()
51 int pos = -1; in contains() local
52 while ((pos = set.find(tag, pos)) != -1) in contains()
53 if (static_cast<KeymasterEnum>(set[pos].enumerated) == val) return true; in contains()
59 int pos = set.find(tag); in contains() local
60 return pos != -1 && set[pos].integer == val; in contains()
65 int pos = -1; in contains() local
66 while ((pos = set.find(tag, pos)) != -1) in contains()
67 if (set[pos].integer == val) return true; in contains()
[all …]
/system/logging/liblog/
Dlog_event_list.cpp37 unsigned pos; /* Read/write position into buffer */ member
52 if ((context->pos + needed) > MAX_EVENT_PAYLOAD) { in init_context()
56 context->storage[context->pos + 0] = EVENT_TYPE_LIST; in init_context()
57 context->list[0] = context->pos + 1; in init_context()
58 context->pos += needed; in init_context()
142 if ((context->pos + needed) > MAX_EVENT_PAYLOAD) { in android_log_write_list_begin()
155 auto* event_list = reinterpret_cast<android_event_list_t*>(&context->storage[context->pos]); in android_log_write_list_begin()
158 context->list[context->list_nest_depth] = context->pos + 1; in android_log_write_list_begin()
160 context->pos += needed; in android_log_write_list_begin()
172 if ((context->pos + needed) > MAX_EVENT_PAYLOAD) { in android_log_write_int32()
[all …]
/system/libcppbor/src/
Dcppbor.cpp40 Iterator writeBigEndian(T value, Iterator pos) {
42 *pos++ = static_cast<uint8_t>(value >> (8 * (sizeof(value) - 1)));
45 return pos;
268 uint8_t* encodeHeader(MajorType type, uint64_t addlInfo, uint8_t* pos, const uint8_t* end) { in encodeHeader() argument
270 if (end - pos < static_cast<ssize_t>(sz)) return nullptr; in encodeHeader()
273 *pos++ = type | static_cast<uint8_t>(addlInfo); in encodeHeader()
274 return pos; in encodeHeader()
276 *pos++ = type | ONE_BYTE_LENGTH; in encodeHeader()
277 *pos++ = static_cast<uint8_t>(addlInfo); in encodeHeader()
278 return pos; in encodeHeader()
[all …]
Dcppbor_parse.cpp45 std::tuple<bool, uint64_t, const uint8_t*> parseLength(const uint8_t* pos, const uint8_t* end, in parseLength() argument
47 if (pos + sizeof(T) > end) { in parseLength()
48 parseClient->error(pos - 1, insufficientLengthString(sizeof(T), end - pos, "length field")); in parseLength()
49 return {false, 0, pos}; in parseLength()
52 const uint8_t* intEnd = pos + sizeof(T); in parseLength()
55 result = static_cast<T>((result << 8) | *pos++); in parseLength()
56 } while (pos < intEnd); in parseLength()
57 return {true, result, pos}; in parseLength()
207 const uint8_t* pos, const uint8_t* end, in handleEntries() argument
213 if (pos == end) { in handleEntries()
[all …]
/system/core/init/
Dfirst_stage_console.cpp34 size_t pos = 0; in KernelConsolePresent() local
36 pos = cmdline.find("console=", pos); in KernelConsolePresent()
37 if (pos == std::string::npos) return false; in KernelConsolePresent()
38 if (pos == 0 || cmdline[pos - 1] == ' ') return true; in KernelConsolePresent()
39 pos++; in KernelConsolePresent()
112 auto pos = bootconfig.find("androidboot.first_stage_console ="); in FirstStageConsole() local
113 if (pos != std::string::npos) { in FirstStageConsole()
115 if (sscanf(bootconfig.c_str() + pos, "androidboot.first_stage_console = \"%d\"", &val) != in FirstStageConsole()
124 pos = cmdline.find("androidboot.first_stage_console="); in FirstStageConsole()
125 if (pos != std::string::npos) { in FirstStageConsole()
[all …]
/system/libhwbinder/
DDebug.cpp95 char* pos = out; in typetostring() local
134 if( fullContext ) *pos++ = '\''; in typetostring()
135 pos = appendcharornum(c[0], pos); in typetostring()
136 pos = appendcharornum(c[1], pos); in typetostring()
137 pos = appendcharornum(c[2], pos); in typetostring()
138 pos = appendcharornum(c[3], pos); in typetostring()
139 if( fullContext ) *pos++ = '\''; in typetostring()
140 *pos = 0; in typetostring()
141 return pos; in typetostring()
145 *pos++ = '0'; in typetostring()
[all …]
/system/memory/lmkd/tests/
Dlmkd_test.cpp70 size_t pos = content.find(marker); in readLogcat() local
71 if (pos == std::string::npos) return ""; in readLogcat()
72 content.erase(0, pos); in readLogcat()
88 std::string getTextAround(const std::string& text, size_t pos, in getTextAround() argument
90 size_t start_pos = pos; in getTextAround()
105 (pos = text.find('\n', pos)) != std::string::npos) { in getTextAround()
106 pos++; in getTextAround()
109 return text.substr(start_pos, (pos == std::string::npos) ? in getTextAround()
110 std::string::npos : pos - start_pos); in getTextAround()
339 size_t pos = 0; in TEST() local
[all …]
/system/keymaster/ng/include/
Dkeystore_hidl_support.h113 auto pos = result.begin(); in authToken2HidlVec() local
114 *pos++ = 0; // Version byte in authToken2HidlVec()
115 pos = copy_bytes_to_iterator(token.challenge, pos); in authToken2HidlVec()
116 pos = copy_bytes_to_iterator(token.userId, pos); in authToken2HidlVec()
117 pos = copy_bytes_to_iterator(token.authenticatorId, pos); in authToken2HidlVec()
118 pos = copy_bytes_to_iterator(token.authenticatorType, pos); in authToken2HidlVec()
119 pos = copy_bytes_to_iterator(token.timestamp, pos); in authToken2HidlVec()
120 pos = std::copy(token.hmac.data(), token.hmac.data() + token.hmac.size(), pos); in authToken2HidlVec()
/system/teeui/libteeui/src/
Dcbor.cpp30 auto pos = state.data_; in writeBytes() local
34 *pos++ = getByte(value, 7); in writeBytes()
35 *pos++ = getByte(value, 6); in writeBytes()
36 *pos++ = getByte(value, 5); in writeBytes()
37 *pos++ = getByte(value, 4); in writeBytes()
40 *pos++ = getByte(value, 3); in writeBytes()
41 *pos++ = getByte(value, 2); in writeBytes()
44 *pos++ = getByte(value, 1); in writeBytes()
47 *pos++ = getByte(value, 0); in writeBytes()
Dmsg_formatting.cpp31 auto pos = out.pos(); in write() local
34 std::copy(buffer, buffer + size, pos); in write()
42 auto pos = in.pos(); in read() local
44 return {in, pos, size}; in read()
/system/keymaster/android_keymaster/
Dauthorization_set.cpp548 for (int pos = -1; (pos = find(tag, pos)) != -1;) in GetTagCount() local
554 int pos = find(tag); in GetTagValueEnum() local
555 if (pos == -1) { in GetTagValueEnum()
558 *val = elems_[pos].enumerated; in GetTagValueEnum()
565 int pos = -1; in GetTagValueEnumRep() local
567 pos = find(tag, pos); in GetTagValueEnumRep()
568 if (pos == -1) { in GetTagValueEnumRep()
573 *val = elems_[pos].enumerated; in GetTagValueEnumRep()
578 int pos = find(tag); in GetTagValueInt() local
579 if (pos == -1) { in GetTagValueInt()
[all …]
/system/logging/liblog/tests/
Dlog_system_test.cpp100 for (size_t pos = 0; (pos = buf.find(content, pos)) != std::string::npos; in TEST() local
101 ++pos) { in TEST()
104 for (size_t pos = 0; in TEST() local
105 (pos = buf.find(content_false, pos)) != std::string::npos; ++pos) { in TEST()
Dlog_radio_test.cpp100 for (size_t pos = 0; (pos = buf.find(content, pos)) != std::string::npos; in TEST() local
101 ++pos) { in TEST()
104 for (size_t pos = 0; in TEST() local
105 (pos = buf.find(content_false, pos)) != std::string::npos; ++pos) { in TEST()
/system/teeui/libteeui/include/teeui/
Dcommon_message_types.h73 template <typename T> inline const uint8_t* copyField(T& field, const uint8_t*(&pos)) { in copyField() argument
75 std::copy(pos, pos + sizeof(T), s); in copyField()
76 return pos + sizeof(T); in copyField()
79 template <typename T> inline uint8_t* copyField(const T& field, uint8_t*(&pos)) { in copyField() argument
81 return std::copy(s, &s[sizeof(T)], pos); in copyField()
91 ReadStream::ptr_t pos = nullptr; in readSimpleVecInPlace() local
93 std::tie(std::get<0>(result), pos, read_size) = read(in); in readSimpleVecInPlace()
99 MsgVector<T>(reinterpret_cast<T*>(const_cast<uint8_t*>(pos)), in readSimpleVecInPlace()
100 reinterpret_cast<T*>(const_cast<uint8_t*>(pos)) + (read_size / sizeof(T))); in readSimpleVecInPlace()
160 teeui::ReadStream::ptr_t pos = nullptr; in read() local
[all …]
Dutf8range.h107 for (auto pos = begin_; pos != end_;) { in verify() local
109 if ((*pos & 0xc0) == 0x80) return false; in verify()
110 auto byte_count = byteCount(*pos); in verify()
112 if (end_ - pos < byte_count) return false; in verify()
116 pos += byte_count; in verify()
/system/extras/simpleperf/
DRecordReadThread.cpp112 size_t pos = sizeof(perf_event_header); in RecordParser() local
114 pos += __builtin_popcountll(sample_type_ & mask) * sizeof(uint64_t); in RecordParser()
116 pid_pos_in_sample_records_ = pos; in RecordParser()
117 pos += sizeof(uint64_t); in RecordParser()
120 time_pos_in_sample_records_ = pos; in RecordParser()
121 pos += sizeof(uint64_t); in RecordParser()
125 pos += __builtin_popcountll(sample_type_ & mask) * sizeof(uint64_t); in RecordParser()
126 read_pos_in_sample_records_ = pos; in RecordParser()
147 size_t pos = read_pos_in_sample_records_; in GetStackSizePos() local
151 read_record_fn(pos, sizeof(nr), &nr); in GetStackSizePos()
[all …]
/system/tools/hidl/
DLocation.cpp43 bool Position::operator<(const Position& pos) const { in operator <()
44 return std::tie(mFilename, mLine, mColumn) < std::tie(pos.mFilename, pos.mLine, pos.mColumn); in operator <()
47 std::ostream& operator<<(std::ostream& ostr, const Position& pos) { in operator <<() argument
48 if (!pos.filename().empty()) { in operator <<()
49 ostr << pos.filename() << ":"; in operator <<()
51 return ostr << pos.line() << "." << pos.column(); in operator <<()
/system/core/libstats/push_compat/
Dstats_event_list.c27 unsigned pos; /* Read/write position into buffer */ member
59 if ((context->pos + needed) > MAX_EVENT_PAYLOAD) { in reset_log_context()
63 context->storage[context->pos + 0] = EVENT_TYPE_LIST; in reset_log_context()
64 context->list[0] = context->pos + 1; in reset_log_context()
65 context->pos += needed; in reset_log_context()
84 len = context->len = context->pos; in stats_write_list()
223 if ((context->pos + needed) > MAX_EVENT_PAYLOAD) { in android_log_write_char_array()
225 len = MAX_EVENT_PAYLOAD - context->pos - 1 - sizeof(int32_t); in android_log_write_char_array()
232 context->storage[context->pos + 0] = EVENT_TYPE_STRING; in android_log_write_char_array()
233 copy4LE(&context->storage[context->pos + 1], len); in android_log_write_char_array()
[all …]
/system/libcppbor/tests/
Dcppbor_test.cpp1430 const uint8_t* pos = encBegin; in TEST() local
1431 EXPECT_CALL(mpc, item(IsArrayOfSize(val.size()), pos, pos + 1, pos + 1)) in TEST()
1433 ++pos; in TEST()
1434 EXPECT_CALL(mpc, item(MatchesItem(ByRef(*val[0])), pos, pos + 1, pos + 6)) in TEST()
1436 pos += 6; in TEST()
1437 EXPECT_CALL(mpc, item(MatchesItem(ByRef(*val[1])), pos, pos + 1, pos + 1)) in TEST()
1439 ++pos; in TEST()
1440 const uint8_t* innerArrayBegin = pos; in TEST()
1441 EXPECT_CALL(mpc, item(IsArrayOfSize(interior.size()), pos, pos + 1, pos + 1)) in TEST()
1443 ++pos; in TEST()
[all …]
/system/core/bootstat/
Dbootstat.cpp551 size_t pos = 0; in isBluntRebootReason() local
552 while ((pos = r.find(',', pos)) != std::string::npos) { in isBluntRebootReason()
553 ++pos; in isBluntRebootReason()
554 std::string next(r.substr(pos)); in isBluntRebootReason()
591 size_t numError(size_t pos, const std::string& _r) const { in numError() argument
592 const char* l = console.c_str() + pos; in numError()
621 size_t pos = console.rfind(needle); // exact match? in rfind() local
622 if (pos != std::string::npos) return pos; in rfind()
625 pos = console.length(); in rfind()
626 if (needle.length() > pos) return std::string::npos; in rfind()
[all …]
/system/chre/apps/nearby/location/lbs/contexthub/nanoapps/nearby/
Dfast_pair_filter.cc179 size_t pos = 0; in MatchSubsequentPair() local
180 memcpy(&key[pos], account_key, kFpAccountKeyLength); in MatchSubsequentPair()
181 pos += kFpAccountKeyLength; in MatchSubsequentPair()
182 memcpy(&key[pos], account_data.salt.data, account_data.salt.length); in MatchSubsequentPair()
183 pos += account_data.salt.length; in MatchSubsequentPair()
188 memcpy(&key[pos], account_data.battery.data, account_data.battery.length); in MatchSubsequentPair()
189 pos += account_data.battery.length; in MatchSubsequentPair()
195 memcpy(&key[pos], account_data.rrd.data, account_data.rrd.length); in MatchSubsequentPair()
196 pos += account_data.rrd.length; in MatchSubsequentPair()
204 for (size_t i = 0; i < pos; i++) { in MatchSubsequentPair()
[all …]
/system/keymaster/ng/
DKeyMintUtils.cpp129 auto pos = result.begin(); in authToken2AidlVec() local
130 *pos++ = 0; // Version byte in authToken2AidlVec()
131 pos = copy_bytes_to_iterator(token->challenge, pos); in authToken2AidlVec()
132 pos = copy_bytes_to_iterator(token->userId, pos); in authToken2AidlVec()
133 pos = copy_bytes_to_iterator(token->authenticatorId, pos); in authToken2AidlVec()
134 pos = copy_bytes_to_iterator(hton(static_cast<uint32_t>(token->authenticatorType)), pos); in authToken2AidlVec()
135 pos = copy_bytes_to_iterator(hton(token->timestamp.milliSeconds), pos); in authToken2AidlVec()
136 pos = std::copy(token->mac.data(), token->mac.data() + token->mac.size(), pos); in authToken2AidlVec()
/system/libvintf/include-host/vintf/
DDirmap.h33 auto pos = arg.find(split); in splitArgs() local
34 auto key = arg.substr(0, pos); in splitArgs()
35 auto value = pos == std::string::npos ? std::string{} : arg.substr(pos + 1); in splitArgs()
/system/incremental_delivery/incfs/include/
Dpath.h64 auto pos = path.rfind('/'); in baseName() local
65 while (!path.empty() && pos == path.size() - 1) { in baseName()
67 pos = path.rfind('/'); in baseName()
69 if (pos == path.npos) { in baseName()
72 return path.substr(pos + 1); in baseName()
83 const auto pos = path.rfind('/'); in dirName() local
84 if (pos == 0) { in dirName()
87 if (pos == path.npos) { in dirName()
90 return path.substr(0, pos); in dirName()

123456