/base/update/updater/services/package/pkg_algorithm/ |
D | pkg_algorithm.cpp | 26 size_t &remainSize, size_t &readLen) const in ReadData() 35 readLen = readBytes; in ReadData() 66 size_t readLen = 0; in Pack() local 68 ret = ReadData(inStream, srcOffset, buffer, remainSize, readLen); in Pack() 71 ret = outStream->Write(buffer, readLen, destOffset); in Pack() 74 algorithm->Update(buffer, readLen); in Pack() 75 srcOffset += readLen; in Pack() 76 destOffset += readLen; in Pack() 98 size_t readLen = 0; in Unpack() local 100 ret = ReadData(inStream, srcOffset, buffer, remainSize, readLen); in Unpack() [all …]
|
D | pkg_algo_lz4.cpp | 78 size_t readLen = 0; in Pack() local 86 ret = ReadData(inStream, srcOffset, inBuffer, remainSize, readLen); in Pack() 91 outBuffer.buffer + LZ4B_REVERSED_LEN, readLen, outBuffer.length - LZ4B_REVERSED_LEN); in Pack() 100 srcOffset += readLen; in Pack() 124 size_t readLen = 0; in Unpack() local 130 int32_t ret = ReadData(inStream, srcOffset, inBuffer, remainSize, readLen); in Unpack() 132 if (readLen == 0) { in Unpack() 142 ret = ReadData(inStream, srcOffset, inBuffer, remainSize, readLen); in Unpack() 147 outBuffer.buffer, readLen, LZ4B_BLOCK_SIZE); in Unpack() 154 srcOffset += readLen; in Unpack() [all …]
|
D | pkg_algo_deflate.cpp | 68 size_t readLen = 0; in Pack() local 70 ret = ReadData(inStream, srcOffset, inBuffer, remainSize, readLen); in Pack() 73 zstream.avail_in = readLen; in Pack() 74 srcOffset += readLen; in Pack() 76 algorithm->Calculate(crcResult, inBuffer, readLen); in Pack() 106 size_t readLen = 0; in UnpackCalculate() local 109 ret = ReadData(inStream, srcOffset, inBuffer, remainCompressedSize, readLen); in UnpackCalculate() 112 zstream.avail_in = readLen; in UnpackCalculate() 113 srcOffset += readLen; in UnpackCalculate()
|
/base/update/updater/services/script/script_interpreter/ |
D | script_scanner.cpp | 23 size_t readLen = 0; in LexerInput() local 25 (void)pkgStream_->Read(data, currPos, maxSize, readLen); in LexerInput() 26 currPos += readLen; in LexerInput() 27 return readLen; in LexerInput()
|
/base/security/appverify/interfaces/innerkits/appverify_lite/src/ |
D | app_verify_hap.c | 45 int ret, readLen, rawBufLen; in ComputeBlockHash() local 55 readLen = (rawBufLen > HASH_BLOB_LEN) ? HASH_BLOB_LEN : rawBufLen; in ComputeBlockHash() 65 …if (memcpy_s((chunkContentPrefix + 1), HAP_DIGEST_PRIFIX_LEN - 1, (&readLen), sizeof(int)) != EOK)… in ComputeBlockHash() 72 ret = mbedtls_md_update(mdCtx, (unsigned char *)block + pos, readLen); in ComputeBlockHash() 74 rawBufLen -= readLen; in ComputeBlockHash() 75 pos += readLen; in ComputeBlockHash() 114 int ret, readLen; in ComputeDigestsWithOptionalBlock() local 134 readLen = chunkDigest->len; in ComputeDigestsWithOptionalBlock() 135 LOG_INFO("readLen %d", readLen); in ComputeDigestsWithOptionalBlock() 136 ret = mbedtls_md_update(mdCtx, chunkDigest->buffer, readLen); in ComputeDigestsWithOptionalBlock() [all …]
|
D | app_centraldirectory.c | 177 int readLen = read(file->fp, buffer->buffer, buffer->len); in ReadFileFullyFromOffset() local 178 if (readLen != buffer->len) { in ReadFileFullyFromOffset() 179 LOG_ERROR("file read error %d --- %d", readLen, buffer->len); in ReadFileFullyFromOffset()
|
/base/update/updater/services/package/pkg_manager/ |
D | pkg_stream.cpp | 67 int32_t FileStream::Read(const PkgBuffer &data, size_t offset, size_t needRead, size_t &readLen) in Read() argument 71 readLen = 0; in Read() 76 readLen = len; in Read() 131 int32_t MemoryMapStream::Read(const PkgBuffer &data, size_t start, size_t needRead, size_t &readLen) in Read() argument 139 readLen = ((copyLen > needRead) ? needRead : copyLen); in Read() 140 …PKG_CHECK(!memcpy_s(data.buffer, needRead, memMap_ + currOffset_, readLen), return PKG_NONE_MEMORY, in Read() 141 "Memcpy failed size:%zu, start:%zu copyLen:%zu %zu", needRead, start, copyLen, readLen); in Read()
|
D | pkg_stream.h | 35 …virtual int32_t Read(const PkgBuffer &data, size_t start, size_t needRead, size_t &readLen) overri… in Read() argument 39 UNUSED(readLen); in Read() 87 int32_t Read(const PkgBuffer &data, size_t start, size_t needRead, size_t &readLen) override; 114 int32_t Read(const PkgBuffer &data, size_t start, size_t needRead, size_t &readLen) override; 163 int32_t Read(const PkgBuffer &data, size_t start, size_t needRead, size_t &readLen) override in Read() argument 167 UNUSED(readLen); in Read()
|
/base/update/updater/services/package/pkg_package/ |
D | pkg_zipfile.cpp | 96 uint32_t endDirLen, size_t endDirPos, size_t &readLen) in LoadPackage() argument 121 sizeof(Zip64EndCentralDirLocator), readLen); in LoadPackage() 127 ret = pkgStream_->Read(buffer, currentPos, sizeof(Zip64EndCentralDirRecord), readLen); in LoadPackage() 159 size_t readLen = 0; in LoadPackage() local 161 int32_t ret = pkgStream_->Read(buffer, endDirPos, sizeof(EndCentralDir), readLen); in LoadPackage() 168 ret = pkgStream_->Read(buffer, endDirPos, sizeof(EndCentralDir), readLen); in LoadPackage() 171 return LoadPackage(fileNames, buffer, endDirLen, endDirPos, readLen); in LoadPackage() 376 size_t readLen = buffer.length; in DecodeCentralDirEntry() local 377 …PKG_CHECK(readLen >= sizeof(CentralDirEntry), return PKG_INVALID_PKG_FORMAT, "data not not enough … in DecodeCentralDirEntry() 390 PKG_CHECK(readLen >= sizeof(CentralDirEntry) + fileNameLength, return PKG_INVALID_PKG_FORMAT, in DecodeCentralDirEntry() [all …]
|
D | pkg_gzipfile.cpp | 168 size_t readLen = 0; in Unpack() local 171 … = inStream->Read(buffer, context.packedSize + fileInfo_.fileInfo.dataOffset, BLOCK_SIZE, readLen); in Unpack() 241 size_t readLen = 0; in DecodeHeader() local 243 int32_t ret = inStream->Read(buffer, blockOffset, buffer.length, readLen); in DecodeHeader() 289 size_t readLen = 0; in LoadPackage() local 291 int32_t ret = pkgStream_->Read(buffer, srcOffset, buffer.length, readLen); in LoadPackage() 304 ret = entry->DecodeHeader(buffer, srcOffset, srcOffset, readLen); in LoadPackage() 305 srcOffset += readLen; in LoadPackage()
|
D | pkg_lz4file.cpp | 150 size_t readLen = 0; in LoadPackage() local 152 int32_t ret = pkgStream_->Read(buffer, srcOffset, buffer.length, readLen); in LoadPackage() 154 …PKG_CHECK(readLen == sizeof(PkgAlgorithmLz4::LZ4B_MAGIC_NUMBER), return PKG_LZ4_FINISH, "Fail to r… in LoadPackage() 165 ret = entry->DecodeHeader(buffer, 0, srcOffset, readLen); in LoadPackage() 166 srcOffset += readLen; in LoadPackage()
|
/base/security/access_token/services/accesstokenmanager/main/cpp/src/token/ |
D | native_token_receptor.cpp | 140 ssize_t readLen = 0; in ReadCfgFile() local 141 while ((readLen = read(fd, buff, BUFFER_SIZE)) > 0) { in ReadCfgFile() 142 nativeRawData.append(buff, readLen); in ReadCfgFile() 146 if (readLen == 0) { in ReadCfgFile()
|
/base/update/updater/test/unittest/updater_binary/ |
D | updater_binary_unittest.cpp | 94 size_t readLen = 0; in BuildFileDigest() local 96 ret = stream->Read(buff, offset, buffSize, readLen); in BuildFileDigest() 100 algorithm->Update(buff, readLen); in BuildFileDigest() 101 offset += readLen; in BuildFileDigest() 102 readLen = 0; in BuildFileDigest()
|
/base/update/updater/test/fuzztest/UpdaterStartUpdaterProc_fuzzer/ |
D | UpdaterStartUpdaterProc_fuzzer.cpp | 71 size_t readLen = 0; in BuildFileDigest() local 73 ret = stream->Read(buff, offset, buffSize, readLen); in BuildFileDigest() 77 algorithm->Update(buff, readLen); in BuildFileDigest() 79 offset += readLen; in BuildFileDigest() 80 readLen = 0; in BuildFileDigest()
|
/base/update/updater/test/unittest/package/ |
D | pkg_test.h | 90 size_t readLen = 0; in BuildFileDigest() local 92 ret = stream->Read(buff, offset, buffSize, readLen); in BuildFileDigest() 96 algorithm->Update(buff, readLen); in BuildFileDigest() 98 offset += readLen; in BuildFileDigest() 99 readLen = 0; in BuildFileDigest()
|
/base/startup/init_lite/services/plugin/bootchart/ |
D | bootchart.c | 49 ssize_t readLen = 0; in ReadFileToBuffer() local 55 readLen = read(fd, buffer, bufferSize - 1); in ReadFileToBuffer() 57 …PLUGIN_CHECK(readLen >= 0, break, "Failed to read data for %s %d readLen %d", fileName, errno, rea… in ReadFileToBuffer() 58 buffer[readLen] = '\0'; in ReadFileToBuffer() 63 return (readLen > 0) ? buffer : NULL; in ReadFileToBuffer()
|
/base/update/updater/services/diffpatch/bzip2/ |
D | bzip2_adapter.cpp | 189 size_t readLen = 0; in ReadData() local 195 readLen = info.length - stream_.avail_out; in ReadData() 200 readLen = info.length; in ReadData() 205 if (readLen < info.length) { in ReadData() 206 PATCH_LOGE("Failed to read mem ret %zu length %zu", readLen, info.length); in ReadData()
|
/base/startup/init_lite/services/loopevent/task/ |
D | le_streamtask.c | 52 int readLen = 0; in HandleRecvMsg_() local 54 readLen = recv(GetSocketFd(taskHandle), buffer->data, LOOP_DEFAULT_BUFFER, 0); in HandleRecvMsg_() 55 LE_LOGV("HandleRecvMsg fd:%d read msg len %d", GetSocketFd(taskHandle), readLen); in HandleRecvMsg_() 56 if (readLen < 0) { in HandleRecvMsg_() 62 } else if (readLen == 0) { in HandleRecvMsg_() 75 recvMessage(taskHandle, buffer->data, readLen); in HandleRecvMsg_()
|
/base/update/updater/test/unittest/script/ |
D | script_unittest.cpp | 198 size_t readLen = 0; in BuildFileDigest() local 200 ret = stream->Read(buff, offset, buffSize, readLen); in BuildFileDigest() 204 algorithm->Update(buff, readLen); in BuildFileDigest() 206 offset += readLen; in BuildFileDigest() 207 readLen = 0; in BuildFileDigest()
|
/base/hiviewdfx/hiview_lite/ |
D | hiview_file.c | 167 int32 ReadFromFile(HiviewFile *fp, uint8 *data, uint32 readLen) in ReadFromFile() argument 169 if (fp == NULL || data == NULL || fp->fhandle < 0 || readLen == 0) { in ReadFromFile() 176 if (wCursor < readLen) { in ReadFromFile() 179 int32 rLen = (readLen <= (wCursor - rCursor)) ? readLen : (wCursor - rCursor); in ReadFromFile()
|
/base/update/updater/test/fuzztest/ExtractAndExecuteScript_fuzzer/ |
D | ExtractAndExecuteScript_fuzzer.cpp | 201 size_t readLen = 0; in BuildFileDigest() local 203 ret = stream->Read(buff, offset, buffSize, readLen); in BuildFileDigest() 207 algorithm->Update(buff, readLen); in BuildFileDigest() 209 offset += readLen; in BuildFileDigest() 210 readLen = 0; in BuildFileDigest()
|
/base/user_iam/pin_auth/hdi/adaptor/src/ |
D | file_operator.c | 46 size_t readLen = fread(buf, sizeof(uint8_t), len, fileOperator); in ReadFile() local 47 if (readLen != len) { in ReadFile()
|
/base/user_iam/auth_executor_mgr/common/adaptor/src/ |
D | file_operator.c | 47 size_t readLen = fread(buf, sizeof(uint8_t), len, fileOperator); in ReadFile() local 48 if (readLen != len) { in ReadFile()
|
/base/security/appverify/interfaces/innerkits/appverify/src/init/ |
D | hap_crl_manager.cpp | 121 long long readLen = crlRandomAccess.ReadFileFullyFromOffset(crlsBuffer, 0); in ReadCrls() local 122 if (readLen != fileLen) { in ReadCrls() 123 …RIFY_LOG_ERROR(LABEL, "read file len: %{public}lld is not same as %{public}lld", readLen, fileLen); in ReadCrls()
|
/base/security/appverify/interfaces/innerkits/appverify/src/util/ |
D | hap_signing_block_utils.cpp | 311 long long readLen = 0; in FindHapSubSigningBlock() local 323 readLen += sizeof(HapSubSignBlockHead); in FindHapSubSigningBlock() 338 if ((blockArrayLen - headLength) < readLen) { in FindHapSubSigningBlock() 350 readLen += headLength; in FindHapSubSigningBlock() 360 if (readLen != blockArrayLen) { in FindHapSubSigningBlock() 362 readLen, blockArrayLen); in FindHapSubSigningBlock()
|