Home
last modified time | relevance | path

Searched refs:stat (Results 1 - 25 of 378) sorted by relevance

12345678910>>...16

/base/update/updater/utils/
H A Dutils_fs.cpp27 #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 Dutils_common.cpp27 #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 Ddlp_link_file.h21 #include <sys/stat.h>
33 struct stat fileStat;
42 struct stat GetLinkStat();
74 struct stat GetFileStat() in GetFileStat()
82 struct stat fileStat_;
H A Dfuse_daemon.h35 struct stat* entryStat;
53 static struct stat* GetRootFileStat();
63 static struct stat rootFileStat_;
/base/startup/init/interfaces/innerkits/fs_manager/erofs_overlay/
H A Derofs_remount_overlay.c17 #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 Ddownload_iana.py26 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 Dlog_file.cpp23 #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 Dmain.cpp17 #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 Dapp_usage_event_factory.cpp113 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 Denumerator.cpp19 #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 Daudit.cpp19 #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 Dcmds_unittest.cpp105 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 Ddfx_dump_catcher.cpp166 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 Dfile_operator.cpp24 #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 Dswitch_root.c24 #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 Dfile_util.cpp20 #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 Daudit_log_analysis.py22 import stat namespace
76 modes = stat.S_IWUSR | stat.S_IRUSR | stat.S_IWGRP | stat.S_IRGRP
/base/update/updater/services/applypatch/
H A Dstore.cpp20 #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 Devent_scan_handler.cpp21 #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 Dfile_util.cpp20 #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 Djson_parser.cpp20 #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 Dinit_utils.c27 #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 Dbootchart.c118 // 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 Dinit.c24 #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 Dcmd_func_test.cpp21 #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...]

Completed in 12 milliseconds

12345678910>>...16