Home
last modified time | relevance | path

Searched refs:stat (Results 1 – 25 of 238) sorted by relevance

12345678910

/system/core/adb/sysdeps/
Dstat_test.cpp25 TEST(sysdeps, stat) { in TEST() argument
29 struct stat st; in TEST()
30 ASSERT_EQ(0, stat(td.path, &st)); in TEST()
34 ASSERT_EQ(0, stat((std::string(td.path) + '/').c_str(), &st)); in TEST()
38 ASSERT_EQ(0, stat((std::string(td.path) + '\\').c_str(), &st)); in TEST()
43 ASSERT_EQ(-1, stat(nonexistent_path.c_str(), &st)); in TEST()
46 ASSERT_EQ(-1, stat((nonexistent_path + "/").c_str(), &st)); in TEST()
50 ASSERT_EQ(-1, stat((nonexistent_path + "\\").c_str(), &st)); in TEST()
54 ASSERT_EQ(0, stat(tf.path, &st)); in TEST()
58 ASSERT_EQ(-1, stat((std::string(tf.path) + '/').c_str(), &st)); in TEST()
[all …]
Dstat.h38 struct adb_stat : public stat {};
40 #undef stat
41 #define stat adb_stat macro
/system/iorap/src/inode2filename/
Dsystem_call.h30 virtual int stat(const char *pathname, struct stat *statbuf) = 0;
50 virtual int stat(const char *pathname, struct stat *statbuf) override { in stat() function
51 return ::stat(pathname, statbuf); in stat()
/system/media/audio_utils/tests/
Dstatistics_tests.cpp126 static void verify(const T &stat, const S &refstat) { in verify() argument
127 EXPECT_EQ(refstat.getN(), stat.getN()); in verify()
128 EXPECT_EQ(refstat.getMin(), stat.getMin()); in verify()
129 EXPECT_EQ(refstat.getMax(), stat.getMax()); in verify()
130 TEST_EXPECT_NEAR(refstat.getWeight(), stat.getWeight()); in verify()
131 TEST_EXPECT_NEAR(refstat.getMean(), stat.getMean()); in verify()
132 TEST_EXPECT_NEAR(refstat.getVariance(), stat.getVariance()); in verify()
133 TEST_EXPECT_NEAR(refstat.getStdDev(), stat.getStdDev()); in verify()
134 TEST_EXPECT_NEAR(refstat.getPopVariance(), stat.getPopVariance()); in verify()
135 TEST_EXPECT_NEAR(refstat.getPopStdDev(), stat.getPopStdDev()); in verify()
[all …]
/system/media/audio_utils/benchmarks/
Dstatistics_benchmark.cpp38 Stats stat(alpha); in BM_MeanVariance() local
39 using T = decltype(stat.getMin()); in BM_MeanVariance()
50 stat.add(datum); in BM_MeanVariance()
55 iters, alpha, (double)stat.getMean(), (double)stat.getPopVariance()); in BM_MeanVariance()
56 stat.reset(); in BM_MeanVariance()
/system/core/libcutils/
Dashmem-host.cpp37 static bool ashmem_validate_stat(int fd, struct stat* buf) { in ashmem_validate_stat()
56 struct stat buf; in ashmem_valid()
90 struct stat buf; in ashmem_get_size_region()
/system/core/libdiskconfig/
Ddiskconfig.c240 struct stat stat; in sync_ptable() local
245 if (fstat(fd, &stat)) { in sync_ptable()
250 if (S_ISBLK(stat.st_mode) && ((rv = ioctl(fd, BLKRRPART, NULL)) < 0)) { in sync_ptable()
277 struct stat stat; in validate() local
287 if (fstat(fd, &stat)) { in validate()
298 if (S_ISBLK(stat.st_mode)) { in validate()
320 } else if (S_ISREG(stat.st_mode)) { in validate()
329 dinfo->num_lba = (uint32_t)(stat.st_size / dinfo->sect_size); in validate()
330 disk_size = (uint64_t)stat.st_size; in validate()
372 if (S_ISBLK(stat.st_mode) && total_size > disk_size) { in validate()
/system/core/init/
Dbootchart.cpp123 std::string stat; in log_processes() local
124 if (android::base::ReadFileToString(StringPrintf("/proc/%d/stat", pid), &stat)) { in log_processes()
127 size_t open = stat.find('('); in log_processes()
128 size_t close = stat.find_last_of(')'); in log_processes()
130 stat.replace(open + 1, close - open - 1, full_name); in log_processes()
133 fputs(stat.c_str(), log); in log_processes()
Dfirst_stage_init.cpp70 struct stat info; in FreeRamdisk()
106 struct stat fileStat; in GetModuleLoadList()
108 if (!stat(recovery_load_path.c_str(), &fileStat)) { in GetModuleLoadList()
259 struct stat old_root_info; in FirstStageMain()
260 if (stat("/", &old_root_info) != 0) { in FirstStageMain()
306 struct stat new_root_info; in FirstStageMain()
307 if (stat("/", &new_root_info) != 0) { in FirstStageMain()
/system/apex/apexer/
Druntests.sh117 [ `sudo stat -c '%u,%g,%A' ${output_dir}/mnt/file1` = "1001,1001,-rw-r--r--" ]
118 [ `sudo stat -c '%u,%g,%A' ${output_dir}/mnt/file2` = "1001,1001,-rw-r--r--" ]
119 [ `sudo stat -c '%u,%g,%A' ${output_dir}/mnt/sub` = "1002,1002,drw-r--r--" ]
120 [ `sudo stat -c '%u,%g,%A' ${output_dir}/mnt/sub/file3` = "1003,1003,-rw-r--r--" ]
121 [ `sudo stat -c '%u,%g,%A' ${output_dir}/mnt/sym1` = "1001,1001,lrw-r--r--" ]
122 [ `sudo stat -c '%u,%g,%A' ${output_dir}/mnt/apex_manifest.pb` = "1000,1000,-rw-r--r--" ]
/system/extras/simpleperf/doc/
Dexecutable_commands_reference.md10 - [The stat command](#the-stat-command)
11 - [Select events to stat](#select-events-to-stat)
12 - [Select target to stat](#select-target-to-stat)
13 - [Decide how long to stat](#decide-how-long-to-stat)
44 Simpleperf has three main commands: stat, record and report.
46 The stat command gives a summary of how many events have happened in the profiled processes in a
77 The stat command: profiles processes and prints counter summary.
91 Below describes the most frequently used commands, which are list, stat, record and report.
119 ## The stat command
121 The stat command is used to get event counter values of the profiled processes. By passing options,
[all …]
/system/core/bootstat/
Dboot_event_record_store.cpp43 struct stat file_stat; in ParseRecordEventTime()
44 if (stat(path.c_str(), &file_stat) == -1) { in ParseRecordEventTime()
79 struct stat file_stat; in AddBootEventWithValue()
80 if (stat(record_path.c_str(), &file_stat) == -1) { in AddBootEventWithValue()
/system/apex/apexd/
Dapexd_utils.h129 struct stat stat_data; in createDirIfNeeded()
131 if (stat(path.c_str(), &stat_data) != 0) { in createDirIfNeeded()
178 struct stat buf; in get_path_inode()
180 if (stat(path.c_str(), &buf) != 0) { in get_path_inode()
213 struct stat sb; in WaitForFile()
214 if (stat(path.c_str(), &sb) != -1) { in WaitForFile()
Dapexd_private.cpp43 struct stat buf; in BindMount()
44 if (stat(target.c_str(), &buf) != 0) { in BindMount()
/system/core/libutils/
DTokenizer.cpp57 struct stat stat; in open() local
58 if (fstat(fd, &stat)) { in open()
62 size_t length = size_t(stat.st_size); in open()
/system/core/fs_mgr/libfiemap/
Dutility.cpp82 struct stat userdata, given; in GetDevicePathForFile()
83 if (!stat(bdev_path.c_str(), &given) && !stat(kUserdataDevice, &userdata)) { in GetDevicePathForFile()
100 struct stat st; in F2fsPinBeforeAllocate()
/system/bt/gd/
Dsetup.py23 import stat
55 current_mode = os.stat(file).st_mode
56 new_mode = current_mode | stat.S_IEXEC
/system/core/adb/client/
Dincremental.cpp42 struct stat st; in read_signature()
43 if (stat(signature_file.c_str(), &st)) { in read_signature()
116 struct stat st; in start_install()
117 if (stat(file.c_str(), &st)) { in start_install()
149 struct stat st; in can_install()
150 if (stat(file.c_str(), &st)) { in can_install()
/system/extras/ioshark/
Ddump_ioshark_filenames.c38 struct stat st; in main()
45 if (stat("ioshark_filenames", &st) < 0) { in main()
/system/extras/tests/storage/
Dopentest.c32 struct stat statbuf; in main()
49 if (stat(dir, &statbuf)) { in main()
/system/bt/osi/src/
Dalarm.cc156 static void update_stat(stat_t* stat, uint64_t delta_ms) { in update_stat() argument
157 if (stat->max_ms < delta_ms) stat->max_ms = delta_ms; in update_stat()
158 stat->total_ms += delta_ms; in update_stat()
159 stat->count++; in update_stat()
718 static void dump_stat(int fd, stat_t* stat, const char* description) { in dump_stat() argument
720 if (stat->count != 0) average_time_ms = stat->total_ms / stat->count; in dump_stat()
723 (unsigned long long)stat->total_ms, (unsigned long long)stat->max_ms, in dump_stat()
/system/extras/tests/directiotest/
Ddirectiotest.c175 struct stat stat; in main() local
193 if (fstat(fd, &stat) == -1) { in main()
196 } else if (!S_ISBLK(stat.st_mode)) { in main()
/system/core/adb/
Dadb_utils.cpp77 struct stat sb; in directory_exists()
78 return stat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode); in directory_exists()
124 struct stat sb; in mkdirs()
125 if (stat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode)) { in mkdirs()
313 struct stat buf; in adb_get_android_dir_path()
314 if (stat(android_dir.c_str(), &buf) == -1) { in adb_get_android_dir_path()
/system/libhwbinder/vts/performance/
DBenchmark_binder.cpp105 int stat, retval; in main() local
106 retval = wait(&stat); in main()
/system/core/libmodprobe/
Dlibmodprobe_ext.cpp82 struct stat fileStat; in ModuleExists()
92 if (stat(deps.front().c_str(), &fileStat)) { in ModuleExists()

12345678910