/base/update/updater/utils/ |
H A D | utils_fs.cpp | 27 #include <sys/stat.h> 39 struct stat info {}; in MkdirRecursive() 55 if (stat(subDir.c_str(), &info) != 0) { in MkdirRecursive() 73 struct stat sb {}; in GetFilesFromDirectory() 74 if (stat(path.c_str(), &sb) == -1) { in GetFilesFromDirectory() 75 LOG(ERROR) << "Failed to stat"; in GetFilesFromDirectory() 83 struct stat st {}; in GetFilesFromDirectory() 84 if (stat(fileName.c_str(), &st) == 0) { in GetFilesFromDirectory() 119 struct stat st {}; in RemoveDir() 121 stat(file_nam in RemoveDir() [all...] |
H A D | utils_common.cpp | 27 #include <sys/stat.h> 71 struct stat st {}; in IsUpdaterMode() 72 if (stat("/bin/updater", &st) == 0 && S_ISREG(st.st_mode)) { in IsUpdaterMode()
|
/base/security/dlp_permission_service/interfaces/inner_api/dlp_fuse/include/ |
H A D | dlp_link_file.h | 21 #include <sys/stat.h> 33 struct stat fileStat; 42 struct stat GetLinkStat(); 74 struct stat GetFileStat() in GetFileStat() 82 struct stat fileStat_;
|
H A D | fuse_daemon.h | 35 struct stat* entryStat; 53 static struct stat* GetRootFileStat(); 63 static struct stat rootFileStat_;
|
/base/startup/init/interfaces/innerkits/fs_manager/erofs_overlay/ |
H A D | erofs_remount_overlay.c | 17 #include <sys/stat.h>
48 struct stat st;
in SetRemountResultFlag() 51 int statRet = stat(REMOUNT_RESULT_PATH, &st);
in SetRemountResultFlag() 104 struct stat statInfo;
in Exchange2Modem() 136 struct stat statInfo;
in OverlayRemountVendorPre() 138 if (!stat(MODEM_DRIVER_MNT_PATH, &statInfo)) {
in OverlayRemountVendorPre() 142 if (!stat(MODEM_VENDOR_MNT_PATH, &statInfo)) {
in OverlayRemountVendorPre() 146 if (!stat(MODEM_FW_MNT_PATH, &statInfo)) {
in OverlayRemountVendorPre() 217 struct stat statInfo;
in RemountOverlay()
|
/base/global/timezone/tool/update_tool/ |
H A D | download_iana.py | 26 import stat namespace 31 modes = stat.S_IWUSR | stat.S_IRUSR 52 modes = stat.S_IWUSR | stat.S_IRUSR 113 modes = stat.S_IWUSR | stat.S_IRUSR
|
/base/hiviewdfx/hiview/base/logstore/ |
H A D | log_file.cpp | 23 #include <sys/stat.h> 32 struct stat sb; in LogFile() 33 if ((fullPath.length() == 0) || (stat(fullPath.c_str(), &sb) == -1)) { in LogFile()
|
/base/hiviewdfx/hilog/services/hilogd/ |
H A D | main.cpp | 17 #include <sys/stat.h> 19 #include <sys/stat.h> 111 struct stat s; in RedirectStdStreamToLogFile() 112 if (stat(path.c_str(), &s) != -1) { in RedirectStdStreamToLogFile() 120 struct stat st; in RedirectStdStreamToLogFile() 121 if (stat(path, &st) == -1) { in RedirectStdStreamToLogFile() 174 struct stat s; in HilogdEntry() 175 if (stat(path.c_str(), &s) != -1) { in HilogdEntry()
|
/base/hiviewdfx/hiview/plugins/usage_event_report/service/factory/ |
H A D | app_usage_event_factory.cpp | 113 for (auto stat : pkgStats) {
in GetAppUsageInfosByUserId() 114 std::string package = stat.bundleName_;
in GetAppUsageInfosByUserId() 118 uint64_t usage = stat.totalInFrontTime_ > 0 ? static_cast<uint64_t>(stat.totalInFrontTime_) : 0;
in GetAppUsageInfosByUserId() 119 uint32_t startNum = stat.startCount_ > 0 ? static_cast<uint32_t>(stat.startCount_) : 0;
in GetAppUsageInfosByUserId() 124 std::string version = GetAppVersion(stat.bundleName_);
in GetAppUsageInfosByUserId() 125 appUsageInfos.push_back(AppUsageInfo(stat.bundleName_, version, usage, dateStr, startNum));
in GetAppUsageInfosByUserId()
|
/base/msdp/device_status/intention/services/device_manager/src/ |
H A D | enumerator.cpp | 19 #include <sys/stat.h> 56 struct stat statbuf; in ScanAndAddDevices() 58 if (stat(devPath.c_str(), &statbuf) != 0) { in ScanAndAddDevices()
|
/base/hiviewdfx/hiview/base/ |
H A D | audit.cpp | 19 #include <sys/stat.h>
127 struct stat sb;
in IsActiveLogFileSizeReachTheashold() 128 if (stat(path.c_str(), &sb) == -1) {
in IsActiveLogFileSizeReachTheashold() 137 struct stat originLogFileStat;
in IsBackupFileActive() 138 if (stat(AUDIT_LOG_PATH, &originLogFileStat) == -1) {
in IsBackupFileActive() 142 struct stat bakLogFileStat;
in IsBackupFileActive() 143 if (stat(AUDIT_LOG_PATH_BAK, &bakLogFileStat) == -1) {
in IsBackupFileActive()
|
/base/startup/init/test/unittest/init/ |
H A D | cmds_unittest.cpp | 105 struct stat info = {}; in HWTEST_F() 106 stat(testFile, &info); in HWTEST_F() 113 stat(testFile, &info); in HWTEST_F() 125 struct stat info; in HWTEST_F() 126 stat(testFile, &info); in HWTEST_F() 131 stat(testFile, &info); in HWTEST_F() 290 INIT_TIMING_STAT stat; in HWTEST_F() local 291 stat.startTime.tv_sec = 2; // 2 is test sec in HWTEST_F() 292 stat.startTime.tv_nsec = 1000; // 1000 is test nsec in HWTEST_F() 294 stat in HWTEST_F() [all...] |
/base/hiviewdfx/faultloggerd/interfaces/innerkits/dump_catcher/ |
H A D | dfx_dump_catcher.cpp | 166 auto stat = reinterpret_cast<struct FaultLoggerdStatsRequest*>(buf.data()); in ReportDumpCatcherStats() local 167 stat->type = DUMP_CATCHER; in ReportDumpCatcherStats() 168 stat->pid = pid; in ReportDumpCatcherStats() 169 stat->requestTime = requestTime; in ReportDumpCatcherStats() 170 stat->dumpCatcherFinishTime = GetTimeMilliSeconds(); in ReportDumpCatcherStats() 171 stat->result = ret ? DUMP_RES_WITH_USERSTACK : DUMP_RES_WITH_KERNELSTACK; // we need more detailed failure info in ReportDumpCatcherStats() 173 stat->result = DUMP_RES_NO_KERNELSTACK; in ReportDumpCatcherStats() 178 copyLen = std::min(sizeof(stat->targetProcess) - 1, processName.size()); in ReportDumpCatcherStats() 179 if (memcpy_s(stat->targetProcess, sizeof(stat in ReportDumpCatcherStats() [all...] |
/base/security/dlp_permission_service/services/dlp_permission/sa/adapt/ |
H A D | file_operator.cpp | 24 #include <sys/stat.h> 119 struct stat buf = {}; in IsExistFile() 120 if (stat(path.c_str(), &buf) != 0) { in IsExistFile() 121 DLP_LOG_ERROR(LABEL, "stat path: %{public}s, errno %{public}d.", path.c_str(), errno); in IsExistFile() 135 struct stat buf = {}; in IsExistDir() 136 if (stat(path.c_str(), &buf) != 0) { in IsExistDir() 137 DLP_LOG_ERROR(LABEL, "stat path: %{public}s, errno %{public}d.", path.c_str(), errno); in IsExistDir()
|
/base/startup/init/interfaces/innerkits/fs_manager/switch_root/ |
H A D | switch_root.c | 24 #include <sys/stat.h> 44 struct stat st = {}; in FreeOldRoot() 46 INIT_LOGE("Failed to get stat of %s", de->d_name); in FreeOldRoot() 150 struct stat oldRootStat = {}; in SwitchRoot() 151 INIT_ERROR_CHECK(stat("/", &oldRootStat) == 0, return -1, "Failed to get old root \"/\" stat"); in SwitchRoot() 154 struct stat newRootStat = {}; in SwitchRoot() 155 if (stat(newRoot, &newRootStat) != 0) { in SwitchRoot() 156 INIT_LOGE("Failed to get new root \" %s \" stat", newRoot); in SwitchRoot() 167 INIT_LOGE("Failed to move mount to new root \" %s \" stat", newRoo in SwitchRoot() [all...] |
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/utility/ |
H A D | file_util.cpp | 20 #include <sys/stat.h>
39 struct stat statBuf {};
in IsFile() 45 struct stat statBuf {};
in IsDirectory() 134 struct stat statBuf {};
in GetDirSize() 136 if (stat(file.c_str(), &statBuf) == 0) {
in GetDirSize() 145 struct stat statBuf {};
in GetFileSize() 146 return stat(file.c_str(), &statBuf) == 0 ? static_cast<uint64_t>(statBuf.st_size) : 0;
in GetFileSize()
|
/base/startup/init/services/modules/seccomp/scripts/tools/ |
H A D | audit_log_analysis.py | 22 import stat
namespace 76 modes = stat.S_IWUSR | stat.S_IRUSR | stat.S_IWGRP | stat.S_IRGRP
|
/base/update/updater/services/applypatch/ |
H A D | store.cpp | 20 #include <sys/stat.h>
65 struct stat fileStat {};
in CreateNewSpace() 67 if (stat(dirPath.c_str(), &fileStat) == -1) {
in CreateNewSpace() 69 LOG(ERROR) << "Create new space, failed to stat";
in CreateNewSpace() 148 struct stat fileStat {};
in LoadDataFromStore() 149 if (stat(path.c_str(), &fileStat) == -1) {
in LoadDataFromStore() 150 LOG(DEBUG) << "Failed to stat";
in LoadDataFromStore()
|
/base/hiviewdfx/hiview/plugins/event_store/event_export/task/expire/ |
H A D | event_scan_handler.cpp | 21 #include <sys/stat.h> 37 struct stat fileInfo {0}; in GetFileLastModifiedTime() 38 if (stat(file.c_str(), &fileInfo) != ERR_OK) { in GetFileLastModifiedTime()
|
/base/hiviewdfx/hisysevent/adapter/native/idl/src/ |
H A D | file_util.cpp | 20 #include <sys/stat.h> 37 struct stat statBuf {}; in IsFile() 43 struct stat statBuf {}; in IsDirectory()
|
/base/security/access_token/frameworks/common/src/ |
H A D | json_parser.cpp | 20 #include <sys/stat.h> 84 struct stat statBuffer; in ReadCfgFile() 123 struct stat buf; in IsDirExsit() 124 if (stat(file.c_str(), &buf) != 0) { in IsDirExsit()
|
/base/startup/init/services/utils/ |
H A D | init_utils.c | 27 #include <sys/stat.h>
130 struct stat fileStat = {0};
in ReadFileToBuf() 133 if (stat(configFile, &fileStat) != 0 ||
in ReadFileToBuf() 367 long long InitDiffTime(INIT_TIMING_STAT *stat)
in InitDiffTime() argument 369 long long diff = (long long)(stat->endTime.tv_sec - stat->startTime.tv_sec) * 1000000; // 1000000 1000ms
in InitDiffTime() 370 if (stat->endTime.tv_nsec > stat->startTime.tv_nsec) {
in InitDiffTime() 371 diff += (stat->endTime.tv_nsec - stat in InitDiffTime() [all...] |
/base/startup/init/services/modules/bootchart/ |
H A D | bootchart.c | 118 // Read process stat line in BootchartLogProcessStat() 119 ret = sprintf_s(path, sizeof(path) - 1, "/proc/%d/stat", pid); in BootchartLogProcessStat() 123 char *stat = ReadFileToBuffer(path, g_bootchartCtrl->buffer, g_bootchartCtrl->bufferSize); in BootchartLogProcessStat() local 124 if (stat == NULL) { in BootchartLogProcessStat() 129 char *start = strstr(stat, "("); in BootchartLogProcessStat() 134 stat[start - stat + 1] = '\0'; in BootchartLogProcessStat() 135 (void)fputs(stat, log); in BootchartLogProcessStat() 139 (void)fputs(stat, log); in BootchartLogProcessStat() 142 (void)fputs(stat, lo in BootchartLogProcessStat() [all...] |
/base/startup/init/services/init/standard/ |
H A D | init.c | 24 #include <sys/stat.h>
185 INIT_TIMING_STAT *stat = (INIT_TIMING_STAT *)executionContext;
in InitPreHook() local 186 clock_gettime(CLOCK_MONOTONIC, &(stat->startTime));
in InitPreHook() 191 INIT_TIMING_STAT *stat = (INIT_TIMING_STAT *)executionContext;
in InitPostHook() local 192 clock_gettime(CLOCK_MONOTONIC, &(stat->endTime));
in InitPostHook() 193 long long diff = InitDiffTime(stat);
in InitPostHook() 300 struct stat sourceInfo = {0};
in SystemConfig() 301 if (stat("/dev/cgroup", &sourceInfo) == 0) {
in SystemConfig()
|
/base/startup/init/test/unittest/lite/ |
H A D | cmd_func_test.cpp | 21 #include <sys/stat.h> 412 struct stat testFileStat = {0}; in HWTEST_F() 413 EXPECT_EQ(0, stat(TEST_FILE.c_str(), &testFileStat)); in HWTEST_F() 447 struct stat testFileStat = {0}; in HWTEST_F() 448 EXPECT_EQ(0, stat(TEST_FILE.c_str(), &testFileStat)); in HWTEST_F() 495 struct stat testFileStat = {0}; in HWTEST_F() 496 EXPECT_EQ(0, stat(TEST_FILE.c_str(), &testFileStat)); in HWTEST_F() 513 EXPECT_EQ(0, stat(TEST_FILE.c_str(), &testFileStat)); in HWTEST_F() 527 struct stat fileStat = {0}; in HWTEST_F() 528 EXPECT_EQ(0, stat(CFG_FIL in HWTEST_F() [all...] |