/base/update/updater/services/applypatch/ |
D | store.cpp | 58 struct stat fileStat {}; in CreateNewSpace() struct 60 if (stat(dirPath.c_str(), &fileStat) == -1) { in CreateNewSpace() 120 struct stat fileStat {}; in LoadDataFromStore() struct 121 UPDATER_WARING_CHECK(stat(path.c_str(), &fileStat) != -1, "Failed to stat", return -1); in LoadDataFromStore() 122 …UPDATER_ERROR_CHECK((fileStat.st_size % H_BLOCK_SIZE) == 0, "Not multiple of block size 4096", ret… in LoadDataFromStore() 126 buffer.resize(fileStat.st_size); in LoadDataFromStore() 127 UPDATER_ERROR_CHECK(ReadFully(fd, buffer.data(), fileStat.st_size), "Failed to read store data", in LoadDataFromStore()
|
/base/security/huks/utils/file_operator/ |
D | hks_file_operator_lite.c | 93 struct stat fileStat; in IsFileExist() local 94 int32_t ret = stat(fileName, &fileStat); in IsFileExist() 128 struct stat fileStat; in FileSize() local 129 (void)memset_s(&fileStat, sizeof(fileStat), 0, sizeof(fileStat)); in FileSize() 130 if (stat(fileName, &fileStat) != 0) { in FileSize() 135 return (uint32_t)fileStat.st_size; in FileSize() 160 struct stat fileStat; in FileRemove() local 161 int32_t ret = stat(fileName, &fileStat); in FileRemove() 171 if (S_ISDIR(fileStat.st_mode)) { in FileRemove() 255 struct stat fileStat; in HksRemoveDir() local [all …]
|
D | hks_file_operator.c | 123 struct stat fileStat; in FileSize() local 124 (void)memset_s(&fileStat, sizeof(fileStat), 0, sizeof(fileStat)); in FileSize() 125 if (stat(fileName, &fileStat) != 0) { in FileSize() 130 return fileStat.st_size; in FileSize() 335 struct stat fileStat; in HksRemoveDir() local 336 int32_t ret = stat(dirPath, &fileStat); in HksRemoveDir() 342 if (S_ISDIR(fileStat.st_mode) == false) { in HksRemoveDir()
|
/base/startup/init_lite/services/init/lite/ |
D | init_cmds.c | 60 struct stat fileStat = { 0 }; in CheckValidCfg() local 61 …if (stat(path, &fileStat) != 0 || fileStat.st_size <= 0 || fileStat.st_size > LOADCFG_MAX_FILE_LEN… in CheckValidCfg()
|
/base/security/huks/interfaces/innerkits/huks_standard/test/unittest/src/ |
D | hks_test_file_operator.c | 123 struct stat fileStat; in FileSize() local 124 (void)memset_s(&fileStat, sizeof(fileStat), 0, sizeof(fileStat)); in FileSize() 125 if (stat(fileName, &fileStat) != 0) { in FileSize() 130 return fileStat.st_size; in FileSize()
|
/base/hiviewdfx/hiview/plugins/eventlogger/log_catcher/ |
D | event_log_catcher.cpp | 116 struct stat fileStat; in GetFdSize() local 117 if (fstat(fd, &fileStat) == -1) { in GetFdSize() 120 return fileStat.st_size; in GetFdSize()
|
/base/security/huks/test/unittest/src/common/ |
D | hks_test_file_operator.c | 133 struct stat fileStat; in FileSize() local 134 (void)memset_s(&fileStat, sizeof(fileStat), 0, sizeof(fileStat)); in FileSize() 135 if (stat(fileName, &fileStat) != 0) { in FileSize() 140 return fileStat.st_size; in FileSize()
|
/base/startup/init_lite/services/utils/ |
D | init_utils.c | 85 struct stat fileStat = {0}; in ReadFileToBuf() local 88 if (stat(configFile, &fileStat) != 0 || in ReadFileToBuf() 89 fileStat.st_size <= 0 || fileStat.st_size > MAX_JSON_FILE_LEN) { in ReadFileToBuf() 98 buffer = (char*)malloc((size_t)(fileStat.st_size + 1)); in ReadFileToBuf() 104 if (fread(buffer, fileStat.st_size, 1, fd) != 1) { in ReadFileToBuf() 109 buffer[fileStat.st_size] = '\0'; in ReadFileToBuf()
|
/base/startup/init_lite/test/unittest/common/ |
D | cmd_func_test.cpp | 541 struct stat fileStat = {0}; variable 542 EXPECT_EQ(0, stat(CFG_FILE.c_str(), &fileStat)); 543 EXPECT_EQ(CFG_FILE_UID, fileStat.st_uid); 544 EXPECT_EQ(CFG_FILE_GID, fileStat.st_gid); 545 EXPECT_EQ(CFG_FILE_MODE, CFG_FILE_MODE & fileStat.st_mode); 546 EXPECT_TRUE(fileStat.st_size > 0); 547 EXPECT_TRUE(fileStat.st_size <= MAX_JSON_FILE_LEN); 554 struct stat fileStat = {0}; in ReadFileToBuf() local 555 (void)stat(CFG_FILE.c_str(), &fileStat); in ReadFileToBuf() 562 buffer = static_cast<char*>(malloc(static_cast<size_t>(fileStat.st_size) + 1)); in ReadFileToBuf() [all …]
|
/base/hiviewdfx/hiview/plugins/eventlogger/test/unittest/common/ |
D | event_logger_action_test.cpp | 89 struct stat fileStat; in GetFdSize() local 90 if (fstat(fd, &fileStat) == -1) { in GetFdSize() 93 return fileStat.st_size; in GetFdSize()
|
/base/hiviewdfx/hiview/plugins/eventlogger/log_catcher/test/unittest/common/ |
D | event_logger_catcher_test.cpp | 89 struct stat fileStat; in GetFdSize() local 90 if (fstat(fd, &fileStat) == -1) { in GetFdSize() 93 return fileStat.st_size; in GetFdSize()
|
/base/security/access_token/interfaces/innerkits/nativetoken/src/ |
D | nativetoken.c | 23 struct stat fileStat; in GetFileBuff() local 36 if (stat(filePath, &fileStat) != 0) { in GetFileBuff() 41 if (fileStat.st_size == 0) { in GetFileBuff() 46 if ((fileStat.st_size < 0) || (fileStat.st_size > MAX_JSON_FILE_LEN)) { in GetFileBuff() 51 size_t fileSize = (unsigned)fileStat.st_size; in GetFileBuff()
|
/base/startup/init_lite/services/init/ |
D | init_common_cmds.c | 254 struct stat fileStat = { 0 }; in DoCopy() local 255 if (stat(ctx->argv[0], &fileStat) != 0) { in DoCopy() 259 mode_t mode = fileStat.st_mode; in DoCopy()
|