Home
last modified time | relevance | path

Searched refs:currLen (Results 1 – 13 of 13) sorted by relevance

/base/startup/init/services/modules/sysevent/
Dstartup_time_event.c32 uint32_t currLen; member
56 …n = GetServiceName(item->paramName, args->buffer + args->currLen, args->bufferLen - args->currLen); in TraversalEvent()
57 PLUGIN_CHECK(len > 0 && (((uint32_t)len + args->currLen) < args->bufferLen), return -1, in TraversalEvent()
59 args->currLen += (uint32_t)len; in TraversalEvent()
61 len = sprintf_s(args->buffer + args->currLen, args->bufferLen - args->currLen, ",%u:%u,%u:%u;", in TraversalEvent()
66 PLUGIN_CHECK(len > 0 && (((uint32_t)len + args->currLen) < args->bufferLen), return -1, in TraversalEvent()
68 args->currLen += (uint32_t)len; in TraversalEvent()
108 if ((args.currLen > 1) && (args.currLen < MAX_BUFFER_FOR_EVENT)) { in ReportBootEventComplete()
109 buffer[args.currLen - 1] = '\0'; in ReportBootEventComplete()
131 … (uint32_t)curr.tv_sec, (uint32_t)(curr.tv_nsec / USTONSEC), args.currLen, startupTime.detailTime); in ReportBootEventComplete()
/base/startup/appspawn/modules/sandbox/
Dappspawn_mount_template.c137 size_t currLen = 0; in DumpSandboxFlags() local
146 len = sprintf_s(buffer + currLen, bufferSize - currLen - 1, " %s ", "|"); in DumpSandboxFlags()
148 currLen += len; in DumpSandboxFlags()
151 len = sprintf_s(buffer + currLen, bufferSize - currLen, "%s", flagsInfos[i].name); in DumpSandboxFlags()
153 currLen += len; in DumpSandboxFlags()
Dappspawn_sandbox.c110 uint32_t currLen = 0; in BuildRootPath() local
119 currLen = rootPath - sandbox->rootPath; in BuildRootPath()
121 if (rootLen > (currLen + userIdLen)) { in BuildRootPath()
122 len = sprintf_s(buffer + currLen, bufferLen - currLen, "%d%s", in BuildRootPath()
123 uid, sandbox->rootPath + currLen + userIdLen); in BuildRootPath()
125 len = sprintf_s(buffer + currLen, bufferLen - currLen, "%d", uid); in BuildRootPath()
127 APPSPAWN_CHECK(len > 0 && (uint32_t)(len < (bufferLen - currLen)), return ret, in BuildRootPath()
129 currLen += (uint32_t)len; in BuildRootPath()
131 buffer[currLen] = '\0'; in BuildRootPath()
/base/startup/init/services/param/liteos/
Dparam_hal.c143 uint32_t currLen = 0; in LoadPersistParam() local
145 while (currLen < fileSize) { in LoadPersistParam()
146 if (buffer[currLen] == '\n') { // split line in LoadPersistParam()
147 buffer[currLen] = '\0'; in LoadPersistParam()
151 if (currLen + 1 >= fileSize) { in LoadPersistParam()
154 tmp = buffer + currLen + 1; in LoadPersistParam()
156 currLen++; in LoadPersistParam()
/base/startup/appspawn/test/unittest/
Dapp_spawn_test_helper.cpp568 uint32_t currLen = sizeof(AppSpawnMsg); in CreateSendMsg() local
572 int ret = addTlvFunc(buffer.data() + currLen, buffer.size() - currLen, realLen, tlvCount); in CreateSendMsg()
573 APPSPAWN_CHECK(ret == 0 && (currLen + realLen) < buffer.size(), in CreateSendMsg()
576 currLen += realLen; in CreateSendMsg()
596 #define ADD_TLV(type, value, currLen, tlvCount) \ argument
601 ret = AddOneTlv(buffer + (currLen), bufferLen - (currLen), d_tlv, (uint8_t *)&(value)); \
603 (currLen) += d_tlv.tlvLen; \
610 uint32_t currLen = 0; in AddBaseTlv() local
615 int ret = AddOneTlv(buffer + currLen, bufferLen - currLen, tlv, (uint8_t *)flags); in AddBaseTlv()
617 currLen += tlv.tlvLen; in AddBaseTlv()
[all …]
/base/startup/appspawn/standard/
Dappspawn_msgmgr.c263 uint32_t currLen = 0; in DecodeAppSpawnMsg() local
264 while (currLen < bufferLen) { in DecodeAppSpawnMsg()
265 AppSpawnTlv *tlv = (AppSpawnTlv *)(message->buffer + currLen); in DecodeAppSpawnMsg()
266 APPSPAWN_CHECK(tlv->tlvLen <= (bufferLen - currLen), break, in DecodeAppSpawnMsg()
268 tlv->tlvType, tlv->tlvLen, currLen + sizeof(AppSpawnMsg)); in DecodeAppSpawnMsg()
271 tlv->tlvType, tlv->tlvLen, currLen + sizeof(AppSpawnMsg)); // show in msg offset in DecodeAppSpawnMsg()
272 ret = CheckMsgTlv(tlv, bufferLen - currLen); in DecodeAppSpawnMsg()
276 message->tlvOffset[tlv->tlvType] = currLen; in DecodeAppSpawnMsg()
277 currLen += tlv->tlvLen; in DecodeAppSpawnMsg()
281 message->tlvOffset[TLV_MAX + tlvCount] = currLen; in DecodeAppSpawnMsg()
[all …]
Dappspawn_service.c288 uint32_t currLen = 0; in OnReceiveRequest() local
294 connection->connectionId, *(uint32_t *)(buffer + currLen), buffLen - currLen); in OnReceiveRequest()
296 ret = GetAppSpawnMsgFromBuffer(buffer + currLen, buffLen - currLen, in OnReceiveRequest()
315 currLen += buffLen - reminder; in OnReceiveRequest()
/base/update/updater/services/package/pkg_package/
Dpkg_upgradefile.cpp598 PkgBuffer headerBuff(buffer.buffer + info.currLen, info.readLen - info.currLen); in SaveEntry()
610 PkgBuffer signBuffer(buffer.buffer + info.currLen, decodeLen); in SaveEntry()
613 info.currLen += decodeLen; in SaveEntry()
653 info.currLen = sizeof(PkgTlv); in ReadComponents()
656 if (info.currLen + sizeof(UpgradeCompInfo) > info.readLen) { in ReadComponents()
664 info.currLen = 0; in ReadComponents()
677 void UpgradePkgFile::ParsePkgHeaderToTlv(const PkgBuffer &buffer, size_t &currLen, PkgTlv &tlv) in ParsePkgHeaderToTlv() argument
690 currLen = sizeof(PkgTlv); in ParsePkgHeaderToTlv()
691 UpgradePkgHeader *header = reinterpret_cast<UpgradePkgHeader *>(buffer.buffer + currLen); in ParsePkgHeaderToTlv()
692 …pkgInfo_.updateFileVersion = ReadLE32(buffer.buffer + currLen + offsetof(UpgradePkgHeader, updateF… in ParsePkgHeaderToTlv()
[all …]
Dpkg_zipfile.cpp463 size_t currLen, uint16_t nameSize, uint16_t extraSize) in DoDecodeCentralDirEntry() argument
474 decodeLen = currLen; in DoDecodeCentralDirEntry()
528 size_t currLen = sizeof(CentralDirEntry) + nameSize + extraSize + commentSize; in DecodeCentralDirEntry() local
529 if (currentPos >= (std::numeric_limits<size_t>::max() - currLen)) { in DecodeCentralDirEntry()
544 return DoDecodeCentralDirEntry(buffer, decodeLen, currLen, nameSize, extraSize); in DecodeCentralDirEntry()
605 size_t currLen = sizeof(LocalFileHeader) + nameSize + extraSize; in DecodeLocalFileHeader() local
606 if (currentPos >= (std::numeric_limits<size_t>::max() - currLen)) { in DecodeLocalFileHeader()
627 decodeLen = currLen; in DecodeLocalFileHeader()
630 ret = DecodeLocalFileHeaderCheck(inStream, data, currentPos + currLen); in DecodeLocalFileHeader()
Dpkg_upgradefile.h60 size_t currLen {};
163 void ParsePkgHeaderToTlv(const PkgBuffer &buffer, size_t &currLen, PkgTlv &tlv);
Dpkg_zipfile.h154 size_t currLen, uint16_t nameSize, uint16_t extraSize);
/base/startup/appspawn/test/unittest/app_spawn_standard_test/
Dapp_spawn_appmgr_test.cpp369 uint32_t currLen = sizeof(uint32_t) + sizeof(uint32_t); variable
370 ret = GetAppSpawnMsgFromBuffer(buffer.data(), currLen, &outMsg, &msgRecvLen, &reminder);
372 EXPECT_EQ(currLen, msgRecvLen);
373 EXPECT_EQ(memcmp(buffer.data(), &outMsg->msgHeader, currLen), 0);
375 …ret = GetAppSpawnMsgFromBuffer(buffer.data() + currLen, sizeof(uint32_t), &outMsg, &msgRecvLen, &r…
376 currLen += sizeof(uint32_t);
378 EXPECT_EQ(currLen, msgRecvLen);
379 EXPECT_EQ(memcmp(buffer.data(), &outMsg->msgHeader, currLen), 0);
383 ret = GetAppSpawnMsgFromBuffer(buffer.data() + currLen,
384 sizeof(AppSpawnMsg) - currLen, &outMsg, &msgRecvLen, &reminder);
[all …]
/base/startup/appspawn/interfaces/innerkits_new/client/
Dappspawn_msg.c123 uint32_t currLen = 0; in AddAppDataToTail() local
129 uint32_t reminderDataLen = realDataLen - currLen; in AddAppDataToTail()
133 … memcpy_s(block->buffer + block->currentIndex, reminderBufferLen, data + currLen, reminderDataLen); in AddAppDataToTail()
139 …t ret = memcpy_s(block->buffer + block->currentIndex, reminderBufferLen, data + currLen, realCopy); in AddAppDataToTail()
142 currLen += realCopy; in AddAppDataToTail()
146 } while (currLen < realDataLen); in AddAppDataToTail()