/base/request/request/upload/unitest/src/ |
D | obtain_file_test.cpp | 76 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 …]
|
D | mock_obtain_file.cpp | 22 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/ |
D | obtain_file.cpp | 32 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/ |
D | param_hal.c | 86 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/ |
D | hks_upgrade_storage_data.c | 115 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() 221 … fileSize = 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/ |
D | cert_manager_storage.c | 127 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/ |
D | obtain_file.h | 36 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/ |
D | hc_file.c | 63 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/ |
D | mock_obtain_file.h | 28 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/ |
D | hks_test_file_operator.c | 208 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/ |
D | file_utils.cpp | 84 int32_t fileSize = GetFileSize(filePath); in CheckFileSize() local 85 if ((fileSize <= 0) || (fileSize > FILE_SIZE_MAX)) { in CheckFileSize()
|
/base/security/huks/utils/file_operator/ |
D | hks_file_operator_lite.c | 294 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/ |
D | cert_manager.h | 44 const uint32_t fileSize, uint32_t *fileCount); 46 void CmFreeFileNames(struct CmBlob *fileNames, const uint32_t fileSize);
|
/base/msdp/device_status/libs/src/ |
D | devicestatus_data_parse.cpp | 137 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/ |
D | daemon_updater.cpp | 132 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()
|
D | flash_commander.cpp | 30 void FlashCommander::DoCommand(const std::string &cmmParam, size_t fileSize) in DoCommand() argument 40 fileSize_ = fileSize; in DoCommand()
|
D | erase_commander.h | 28 …void DoCommand([[maybe_unused]] const std::string &cmmParam, [[maybe_unused]] size_t fileSize) ove…
|
D | format_commander.h | 29 …void DoCommand([[maybe_unused]] const std::string &cmmParam, [[maybe_unused]] size_t fileSize) ove…
|
D | update_commander.h | 28 …void DoCommand([[maybe_unused]] const std::string &cmmParam, [[maybe_unused]] size_t fileSize) ove…
|
D | update_commander.cpp | 40 void UpdateCommander::DoCommand(const std::string &cmmParam, size_t fileSize) in DoCommand() argument 61 fileSize_ = fileSize; in DoCommand()
|
D | flash_commander.h | 28 …void DoCommand([[maybe_unused]] const std::string &cmmParam, [[maybe_unused]] size_t fileSize) ove…
|
D | erase_commander.cpp | 28 …ommander::DoCommand([[maybe_unused]] const std::string &cmmParam, [[maybe_unused]] size_t fileSize) in DoCommand() argument
|
/base/update/updater/test/unittest/package/ |
D | pkg_manager_unittest.cpp | 388 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/ |
D | flash_service_unittest.cpp | 181 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/ |
D | sym_token_manager.c | 169 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()
|