Home
last modified time | relevance | path

Searched refs:fileSize (Results 1 – 25 of 46) sorted by relevance

12

/base/request/request/upload/unitest/src/
Dobtain_file_test.cpp76 unsigned int fileSize = 0; variable
84 result = this->obfile->GetFile(&file, uri, fileSize, context);
87 EXPECT_EQ(fileSize, 0);
109 unsigned int fileSize = 0; variable
119 result = this->obfile->GetFile(&file, uri, fileSize, context);
123 EXPECT_EQ(fileSize, testFileInfo.size() + 1);
138 unsigned int fileSize = 0; variable
143 result = this->obfile->GetFile(&file, uri, fileSize, context);
147 EXPECT_EQ(fileSize, 0);
159 unsigned int fileSize = 0; variable
[all …]
Dmock_obtain_file.cpp22 unsigned int& fileSize, std::shared_ptr<OHOS::AbilityRuntime::Context> &context) in GetFile() argument
24 return GetDataAbilityFile(file, fileUri, fileSize, context); in GetFile()
28 uint32_t& fileSize, std::shared_ptr<OHOS::AbilityRuntime::Context> &context) in GetDataAbilityFile() argument
63 fileSize = fileLength; in GetDataAbilityFile()
/base/request/request/upload/frameworks/libs/src/
Dobtain_file.cpp32 unsigned int& fileSize, std::shared_ptr<OHOS::AbilityRuntime::Context> &context) in GetFile() argument
41 ret = GetDataAbilityFile(file, fileUri, fileSize, context); in GetFile()
44 ret = GetInternalFile(file, fileUri, fileSize, context); in GetFile()
49 fileSize = 0; in GetFile()
52 …OAD_HILOGD(UPLOAD_MODULE_FRAMEWORK, "get file ret : %{public}d, size : %{public}u", ret, fileSize); in GetFile()
57 uint32_t& fileSize, std::shared_ptr<OHOS::AbilityRuntime::Context> &context) in GetDataAbilityFile() argument
89 fileSize = static_cast<uint32_t>(fileLength); in GetDataAbilityFile()
116 uint32_t ObtainFile::GetInternalFile(FILE **file, const std::string &fileUri, uint32_t &fileSize, in GetInternalFile() argument
142 fileSize = fileLength; in GetInternalFile()
/base/startup/init/services/param/liteos/
Dparam_hal.c86 static int ParamFileStat(const char* path, unsigned int* fileSize) in ParamFileStat() argument
93 *fileSize = lseek(fd, 0, SEEK_END); in ParamFileStat()
97 return UtilsFileStat(path, fileSize); in ParamFileStat()
135 uint32_t fileSize = 0; in LoadPersistParam() local
136 int ret = ParamFileStat(path, &fileSize); in LoadPersistParam()
138 buffer = malloc(fileSize); in LoadPersistParam()
140 ret = ParamFileRead(fd, buffer, fileSize); in LoadPersistParam()
145 while (currLen < fileSize) { in LoadPersistParam()
151 if (currLen + 1 >= fileSize) { in LoadPersistParam()
/base/security/huks/services/huks_standard/huks_service/main/core/src/
Dhks_upgrade_storage_data.c115 int32_t fileSize = HksOldVersionFileSize(oldFileName); in CopyRootKeyMaterialFile() local
116 if (fileSize < HKS_RKC_KSF_BUF_LEN) { in CopyRootKeyMaterialFile()
117 HKS_LOG_E("get old version file size failed, ret = %" LOG_PUBLIC "d", fileSize); in CopyRootKeyMaterialFile()
121 uint8_t *tmpBuf = (uint8_t *)HksMalloc(fileSize); in CopyRootKeyMaterialFile()
125 ret = HksOldVersionFileRead(oldFileName, 0, tmpBuf, fileSize); in CopyRootKeyMaterialFile()
132 struct HksBlob newFileBlob = { fileSize, tmpBuf }; in CopyRootKeyMaterialFile()
212 int32_t fileSize = HksOldVersionFileSize(HKS_KEY_STORE_FILE_NAME); in GetOldVersionKeyStoreBuf() local
213 if ((fileSize < 0) || ((uint32_t)fileSize < offset)) { in GetOldVersionKeyStoreBuf()
221fileSize = HksOldVersionFileRead(HKS_KEY_STORE_FILE_NAME, offset, tmpBuf, HKS_BUF_BYTES - offset); in GetOldVersionKeyStoreBuf()
222 if ((fileSize <= 0) || ((uint32_t)fileSize < (HKS_BUF_BYTES - offset))) { in GetOldVersionKeyStoreBuf()
[all …]
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/
Dcert_manager_storage.c127 uint32_t fileSize = CmFileSize(path, fileName); in CmStorageGetBuf() local
128 if (fileSize == 0 || fileSize > MAX_OUT_BLOB_SIZE) { in CmStorageGetBuf()
129 CM_LOG_E("file size[%u] invalid", fileSize); in CmStorageGetBuf()
133 uint8_t *data = (uint8_t *)CMMalloc(fileSize); in CmStorageGetBuf()
139 uint32_t readSize = CmFileRead(path, fileName, 0, data, fileSize); in CmStorageGetBuf()
147 storageBuf->size = fileSize; in CmStorageGetBuf()
/base/request/request/upload/frameworks/libs/include/
Dobtain_file.h36 uint32_t& fileSize, std::shared_ptr<OHOS::AbilityRuntime::Context> &context);
39 uint32_t& fileSize, std::shared_ptr<OHOS::AbilityRuntime::Context> &context);
41 uint32_t& fileSize, std::shared_ptr<OHOS::AbilityRuntime::Context> &context);
/base/security/device_auth/deps_adapter/os_adapter/impl/src/liteos/mini/
Dhc_file.c63 int fileSize = 0; in HcFileSize() local
64 int ret = UtilsFileStat(file.filePath, (unsigned int *)&fileSize); in HcFileSize()
65 LOGI("ret = %d, fileSize = %d\n", ret, fileSize); in HcFileSize()
67 return fileSize; in HcFileSize()
/base/request/request/upload/unitest/include/
Dmock_obtain_file.h28 unsigned int& fileSize, std::shared_ptr<OHOS::AbilityRuntime::Context> &context);
30 unsigned int& fileSize, std::shared_ptr<OHOS::AbilityRuntime::Context> &context);
/base/security/huks/test/unittest/huks_lite_test/common/
Dhks_test_file_operator.c208 unsigned int fileSize; in FileRead() local
209 int32_t ret = UtilsFileStat(fileName, &fileSize); in FileRead()
215 if (len > fileSize) { in FileRead()
216 … HKS_TEST_LOG_E("read data over file size!\n, file size = %d\n, buf len = %d\n", fileSize, len); in FileRead()
266 unsigned int fileSize; in FileSize() local
267 int32_t ret = UtilsFileStat(fileName, &fileSize); in FileSize()
272 return fileSize; in FileSize()
/base/sensors/miscdevice/utils/src/
Dfile_utils.cpp84 int32_t fileSize = GetFileSize(filePath); in CheckFileSize() local
85 if ((fileSize <= 0) || (fileSize > FILE_SIZE_MAX)) { in CheckFileSize()
/base/security/huks/utils/file_operator/
Dhks_file_operator_lite.c294 unsigned int fileSize; in IsFileExist() local
295 int32_t ret = UtilsFileStat(fileName, &fileSize); in IsFileExist()
309 unsigned int fileSize; in FileRead() local
310 int32_t ret = UtilsFileStat(fileName, &fileSize); in FileRead()
316 if (len > fileSize) { in FileRead()
318 fileSize, len); in FileRead()
363 unsigned int fileSize; in FileSize() local
364 int32_t ret = UtilsFileStat(fileName, &fileSize); in FileSize()
369 return fileSize; in FileSize()
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/include/
Dcert_manager.h44 const uint32_t fileSize, uint32_t *fileCount);
46 void CmFreeFileNames(struct CmBlob *fileNames, const uint32_t fileSize);
/base/msdp/device_status/libs/src/
Ddevicestatus_data_parse.cpp137 int32_t fileSize = GetFileSize(filePath); in CheckFileSize() local
138 if ((fileSize <= 0) || (fileSize > FILE_SIZE_MAX)) { in CheckFileSize()
142 return fileSize; in CheckFileSize()
/base/update/updater/services/flashd/daemon/
Ddaemon_updater.cpp132 ctxNow.fileSize = ctxNow.transferConfig.fileSize; in CheckCommand()
135 ctxNow.transferConfig.options.c_str(), ctxNow.transferConfig.fileSize); in CheckCommand()
142 commander_->DoCommand(ctxNow.transferConfig.options, ctxNow.transferConfig.fileSize); in CheckCommand()
Dflash_commander.cpp30 void FlashCommander::DoCommand(const std::string &cmmParam, size_t fileSize) in DoCommand() argument
40 fileSize_ = fileSize; in DoCommand()
Derase_commander.h28 …void DoCommand([[maybe_unused]] const std::string &cmmParam, [[maybe_unused]] size_t fileSize) ove…
Dformat_commander.h29 …void DoCommand([[maybe_unused]] const std::string &cmmParam, [[maybe_unused]] size_t fileSize) ove…
Dupdate_commander.h28 …void DoCommand([[maybe_unused]] const std::string &cmmParam, [[maybe_unused]] size_t fileSize) ove…
Dupdate_commander.cpp40 void UpdateCommander::DoCommand(const std::string &cmmParam, size_t fileSize) in DoCommand() argument
61 fileSize_ = fileSize; in DoCommand()
Dflash_commander.h28 …void DoCommand([[maybe_unused]] const std::string &cmmParam, [[maybe_unused]] size_t fileSize) ove…
Derase_commander.cpp28 …ommander::DoCommand([[maybe_unused]] const std::string &cmmParam, [[maybe_unused]] size_t fileSize) in DoCommand() argument
/base/update/updater/test/unittest/package/
Dpkg_manager_unittest.cpp388 size_t fileSize = GetFileSize(testFileName); in TestDecompressLz4() local
416 void* mappedData = mmap(nullptr, fileSize, PROT_READ, MAP_SHARED, fd, 0); in TestDecompressLz4()
421 Hpackage::PkgBuffer buffer(static_cast<uint8_t*>(mappedData) + addrOffset, fileSize); in TestDecompressLz4()
430 munmap(mappedData, fileSize); in TestDecompressLz4()
434 lz4Info.fileInfo.packedSize, lz4Info.fileInfo.unpackedSize, fileSize); in TestDecompressLz4()
439 size_t &fileSize, void *mappedData) in TestDecompressGzipInitFile() argument
461 PkgFile::ConvertBufferToString(fileName, {buffer + offset, fileSize - offset}); in TestDecompressGzipInitFile()
466 PkgFile::ConvertBufferToString(comment, {buffer + offset, fileSize - offset}); in TestDecompressGzipInitFile()
479 size_t fileSize = GetFileSize(testFileName); in TestDecompressGzip() local
508 void* mappedData = mmap(nullptr, fileSize, PROT_READ, MAP_SHARED, fd, 0); in TestDecompressGzip()
[all …]
/base/update/updater/test/unittest/flashd_test/
Dflash_service_unittest.cpp181 transferConfig.fileSize = 163884012; // 163884012 file size in TestDaemonUpdater()
199 payloadHead.uncompressSize = transferConfig.fileSize / 10; // 10 time in TestDaemonUpdater()
200 payloadHead.compressSize = transferConfig.fileSize / 10; // 10 time in TestDaemonUpdater()
237 transferConfig.fileSize = 1468006400; // 1468006400 file size in TestHdcDaemonInvalid()
278 transferConfig.fileSize = 1468006400; // 1468006400 file size in TestHdcDaemonFlash()
282 const uint64_t realSize = transferConfig.fileSize; in TestHdcDaemonFlash()
296 payloadHead.uncompressSize = transferConfig.fileSize / 10; // 10 time in TestHdcDaemonFlash()
297 payloadHead.compressSize = transferConfig.fileSize / 10; // 10 time in TestHdcDaemonFlash()
/base/security/device_auth/services/authenticators/src/account_related/creds_manager/
Dsym_token_manager.c169 int32_t fileSize = HcFileSize(file); in ReadTokensFromFile() local
170 if (fileSize <= 0) { in ReadTokensFromFile()
175 char *fileData = (char *)HcMalloc(fileSize, 0); in ReadTokensFromFile()
181 if (HcFileRead(file, fileData, fileSize) != fileSize) { in ReadTokensFromFile()
216 int32_t fileSize = (int32_t)(HcStrlen(storeJsonString) + 1); in WriteTokensJsonToFile() local
217 if (HcFileWrite(file, storeJsonString, fileSize) != fileSize) { in WriteTokensJsonToFile()

12