Home
last modified time | relevance | path

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

12345678

/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/core/libnativebridge/tests/
DCodeCacheCreate_test.cpp29 struct stat st; in TEST_F()
30 ASSERT_EQ(-1, stat(kCodeCache, &st)); in TEST_F()
41 ASSERT_EQ(0, stat(kCodeCache, &st)); in TEST_F()
DCodeCacheExists_test.cpp29 struct stat st; in TEST_F()
30 ASSERT_EQ(-1, stat(kCodeCache, &st)); in TEST_F()
44 ASSERT_EQ(0, stat(kCodeCache, &st)); in TEST_F()
DCodeCacheStatFail_test.cpp33 struct stat st; in TEST_F()
34 ASSERT_EQ(-1, stat(kCodeCacheStatFail, &st)); in TEST_F()
/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.cpp121 std::string stat; in log_processes() local
122 if (android::base::ReadFileToString(StringPrintf("/proc/%d/stat", pid), &stat)) { in log_processes()
125 size_t open = stat.find('('); in log_processes()
126 size_t close = stat.find_last_of(')'); in log_processes()
128 stat.replace(open + 1, close - open - 1, full_name); in log_processes()
131 fputs(stat.c_str(), log); in log_processes()
Dreboot.cpp157 static void LogShutdownTime(UmountStat stat, Timer* t) { in LogShutdownTime() argument
159 << stat; in LogShutdownTime()
312 UmountStat stat = UmountPartitions(timeout - t.duration()); in TryUmountAndFsck() local
313 if (stat != UMOUNT_STAT_SUCCESS) { in TryUmountAndFsck()
322 if (stat == UMOUNT_STAT_SUCCESS && runFsck) { in TryUmountAndFsck()
329 return stat; in TryUmountAndFsck()
462 UmountStat stat = TryUmountAndFsck(runFsck, shutdown_timeout - t.duration()); in DoReboot() local
466 LogShutdownTime(stat, &t); in DoReboot()
Dutil.cpp172 struct stat sb; in ReadFile()
220 struct stat info; in mkdir_recursive()
221 if (stat(directory.c_str(), &info) != 0) { in mkdir_recursive()
234 struct stat sb; in wait_for_file()
235 if (stat(filename, &sb) != -1) { in wait_for_file()
289 struct stat info; in is_dir()
290 if (stat(pathname, &info) == -1) { in is_dir()
/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/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()
122 struct stat sb; in mkdirs()
123 if (stat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode)) { in mkdirs()
266 struct stat buf; in adb_get_android_dir_path()
267 if (stat(android_dir.c_str(), &buf) == -1) { in adb_get_android_dir_path()
Dfile_sync_client.cpp317 bool FinishStat(struct stat* st) { in FinishStat()
426 struct stat st; in SendLargeFile()
427 if (stat(lpath, &st) == -1) { in SendLargeFile()
636 static bool sync_stat(SyncConnection& sc, const char* path, struct stat* st) { in sync_stat()
640 static bool sync_lstat(SyncConnection& sc, const char* path, struct stat* st) { in sync_lstat()
644 static bool sync_stat_fallback(SyncConnection& sc, const char* path, struct stat* st) { in sync_stat_fallback()
665 struct stat tmp_st; in sync_stat_fallback()
682 struct stat st; in sync_send()
710 struct stat st; in sync_send()
711 if (stat(lpath, &st) == -1) { in sync_send()
[all …]
/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/extras/ioshark/
Ddump_ioshark_filenames.c38 struct stat st; in main()
45 if (stat("ioshark_filenames", &st) < 0) { in main()
/system/bt/osi/src/
Dalarm.cc163 static void update_stat(stat_t* stat, period_ms_t delta) { in update_stat() argument
164 if (stat->max_ms < delta) stat->max_ms = delta; in update_stat()
165 stat->total_ms += delta; in update_stat()
166 stat->count++; in update_stat()
717 static void dump_stat(int fd, stat_t* stat, const char* description) { in dump_stat() argument
719 if (stat->count != 0) average_time_ms = stat->total_ms / stat->count; in dump_stat()
722 (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/extras/tests/storage/
Dopentest.c32 struct stat statbuf; in main()
49 if (stat(dir, &statbuf)) { in main()
/system/extras/simpleperf/
Dutils.cpp146 struct stat st; in IsDir()
147 if (stat(dirpath.c_str(), &st) == 0) { in IsDir()
156 struct stat st; in IsRegularFile()
157 if (stat(filename.c_str(), &st) == 0) { in IsRegularFile()
166 struct stat st; in GetFileSize()
167 if (stat(filename.c_str(), &st) == 0) { in GetFileSize()
/system/core/logd/
DLogStatistics.cpp311 static void formatTmp(const LogStatistics& stat, const char* nameTmp, uid_t uid, in formatTmp() argument
314 if (!nameTmp) nameTmp = allocNameTmp = stat.uidToName(uid); in formatTmp()
335 std::string UidEntry::format(const LogStatistics& stat, log_id_t id) const { in format() argument
340 formatTmp(stat, nullptr, uid, name, size, 6); in format()
346 stat.uidTable[id].begin(); in format()
347 it != stat.uidTable[id].end(); ++it) { in format()
350 size_t sizes = stat.sizes(id); in format()
351 size_t totalSize = stat.sizesTotal(id); in format()
352 size_t totalElements = stat.elementsTotal(id); in format()
405 stat.pidSystemTable[id].sort(uid, (pid_t)0, maximum_sorted_entries); in format()
[all …]
/system/libhwbinder/vts/performance/
DBenchmark_binder.cpp105 int stat, retval; in main() local
106 retval = wait(&stat); in main()
/system/core/libunwindstack/tools/
Dunwind_symbols.cpp39 struct stat st; in main()
40 if (stat(argv[1], &st) == -1) { in main()
/system/nfc/src/adaptation/
Dnfc_config.cc38 struct stat file_stat; in findConfigPath()
39 if (stat(path.c_str(), &file_stat) != 0) continue; in findConfigPath()
/system/extras/simpleperf/scripts/
Dupdate.py22 import stat
138 exe_stat = os.stat(name)
139 os.chmod(name, exe_stat.st_mode | stat.S_IEXEC)
/system/core/storaged/include/
Dstoraged_uid_monitor.h109 void init(charger_stat_t stat);
116 void set_charger_state(charger_stat_t stat);
/system/extras/boot_control_copy/
Dboot_control_copy.cpp46 struct stat statbuf; in get_dev_t_for_partition()
64 struct stat statbuf; in module_getCurrentSlot()
67 if (stat("/system", &statbuf) != 0) { in module_getCurrentSlot()

12345678