/system/core/adb/sysdeps/ |
D | stat_test.cpp | 25 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 …]
|
D | stat.h | 38 struct adb_stat : public stat {}; 40 #undef stat 41 #define stat adb_stat macro
|
/system/core/libnativebridge/tests/ |
D | CodeCacheCreate_test.cpp | 29 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()
|
D | CodeCacheExists_test.cpp | 29 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()
|
D | CodeCacheStatFail_test.cpp | 33 struct stat st; in TEST_F() 34 ASSERT_EQ(-1, stat(kCodeCacheStatFail, &st)); in TEST_F()
|
/system/core/libdiskconfig/ |
D | diskconfig.c | 242 struct stat stat; in sync_ptable() local 247 if (fstat(fd, &stat)) { in sync_ptable() 252 if (S_ISBLK(stat.st_mode) && ((rv = ioctl(fd, BLKRRPART, NULL)) < 0)) { in sync_ptable() 279 struct stat stat; in validate() local 289 if (fstat(fd, &stat)) { in validate() 300 if (S_ISBLK(stat.st_mode)) { in validate() 322 } else if (S_ISREG(stat.st_mode)) { in validate() 331 dinfo->num_lba = (uint32_t)(stat.st_size / dinfo->sect_size); in validate() 332 disk_size = (uint64_t)stat.st_size; in validate() 374 if (S_ISBLK(stat.st_mode) && total_size > disk_size) { in validate()
|
/system/extras/simpleperf/ |
D | utils.cpp | 134 struct stat st; in IsDir() 135 if (stat(dirpath.c_str(), &st) == 0) { in IsDir() 144 struct stat st; in IsRegularFile() 145 if (stat(filename.c_str(), &st) == 0) { in IsRegularFile() 154 struct stat st; in GetFileSize() 155 if (stat(filename.c_str(), &st) == 0) { in GetFileSize()
|
/system/core/init/ |
D | bootchart.cpp | 136 std::string stat; in do_log_procs() local 137 if (android::base::ReadFileToString(filename, &stat)) { in do_log_procs() 140 size_t open = stat.find('('); in do_log_procs() 141 size_t close = stat.find_last_of(')'); in do_log_procs() 143 stat.replace(open + 1, close - open - 1, full_name); in do_log_procs() 146 fputs(stat.c_str(), log); in do_log_procs()
|
D | util.cpp | 186 struct stat sb; in read_file() 306 struct stat info; in mkdir_recursive() 321 if (stat(buf, &info) != 0) { in mkdir_recursive() 392 struct stat info; in wait_for_file() 396 while (gettime_ns() < timeout_time_ns && ((ret = stat(filename, &info)) < 0)) in wait_for_file() 494 struct stat info; in is_dir() 495 if (stat(pathname, &info) == -1) { in is_dir()
|
/system/core/libutils/ |
D | Tokenizer.cpp | 61 struct stat stat; in open() local 62 if (fstat(fd, &stat)) { in open() 66 size_t length = size_t(stat.st_size); in open()
|
/system/core/bootstat/ |
D | boot_event_record_store.cpp | 41 struct stat file_stat; in ParseRecordEventTime() 42 if (stat(path.c_str(), &file_stat) == -1) { in ParseRecordEventTime() 104 struct stat file_stat; in AddBootEventWithValue() 105 if (stat(record_path.c_str(), &file_stat) == -1) { in AddBootEventWithValue()
|
/system/core/logd/ |
D | LogStatistics.cpp | 216 std::string UidEntry::format(const LogStatistics &stat, log_id_t id) const { in format() argument 219 const char *nameTmp = stat.uidToName(uid); in format() 232 for (LogStatistics::uidTable_t::const_iterator it = stat.uidTable[id].begin(); in format() 233 it != stat.uidTable[id].end(); ++it) { in format() 236 size_t sizes = stat.sizes(id); in format() 237 size_t totalSize = stat.sizesTotal(id); in format() 238 size_t totalElements = stat.elementsTotal(id); in format() 293 = stat.pidSystemTable[id].sort(uid, (pid_t)0, maximum_sorted_entries); in format() 312 byPid += entry->format(stat, id); in format() 333 std::string PidEntry::format(const LogStatistics &stat, log_id_t /* id */) const { in format() argument [all …]
|
/system/core/adb/ |
D | file_sync_service.cpp | 84 msg.stat.id = ID_STAT; in do_stat() 86 struct stat st; in do_stat() 90 msg.stat.mode = st.st_mode; in do_stat() 91 msg.stat.size = st.st_size; in do_stat() 92 msg.stat.time = st.st_mtime; in do_stat() 94 return WriteFdExactly(s, &msg.stat, sizeof(msg.stat)); in do_stat() 109 struct stat st; in do_list() 324 struct stat st; in do_send()
|
D | file_sync_client.cpp | 215 struct stat st; in SendLargeFile() 216 if (stat(lpath, &st) == -1) { in SendLargeFile() 460 if (!ReadFdExactly(sc.fd, &msg.stat, sizeof(msg.stat)) || msg.stat.id != ID_STAT) { in sync_finish_stat() 464 if (timestamp) *timestamp = msg.stat.time; in sync_finish_stat() 465 if (mode) *mode = msg.stat.mode; in sync_finish_stat() 466 if (size) *size = msg.stat.size; in sync_finish_stat() 498 struct stat st; in sync_send() 499 if (stat(lpath, &st) == -1) { in sync_send() 619 struct stat st; in local_build_list() 749 struct stat st; in do_sync_push() [all …]
|
D | adb_utils.cpp | 74 struct stat sb; in directory_exists() 165 struct stat sb; in mkdirs() 166 if (stat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode)) { in mkdirs()
|
D | adb_auth_host.cpp | 298 struct stat buf; in get_user_keyfilepath() 299 if (stat(android_dir.c_str(), &buf)) { in get_user_keyfilepath() 312 struct stat buf; in get_user_key() 324 if (stat(path, &buf) == -1) { in get_user_key()
|
/system/extras/ext4_utils/ |
D | make_ext4fs.c | 153 struct stat stat; in build_directory_structure() local 202 ret = lstat(dentries[i].full_path, &stat); in build_directory_structure() 210 dentries[i].size = stat.st_size; in build_directory_structure() 211 dentries[i].mode = stat.st_mode & (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO); in build_directory_structure() 213 dentries[i].mtime = stat.st_mtime; in build_directory_structure() 223 int dir = S_ISDIR(stat.st_mode); in build_directory_structure() 235 if (selabel_lookup(sehnd, &dentries[i].secon, dentries[i].path, stat.st_mode) < 0) { in build_directory_structure() 244 if (S_ISREG(stat.st_mode)) { in build_directory_structure() 246 } else if (S_ISDIR(stat.st_mode)) { in build_directory_structure() 249 } else if (S_ISCHR(stat.st_mode)) { in build_directory_structure() [all …]
|
/system/bt/osi/src/ |
D | alarm.c | 142 static void update_stat(stat_t *stat, period_ms_t delta) in update_stat() argument 144 if (stat->max_ms < delta) in update_stat() 145 stat->max_ms = delta; in update_stat() 146 stat->total_ms += delta; in update_stat() 147 stat->count++; in update_stat() 717 static void dump_stat(int fd, stat_t *stat, const char *description) in dump_stat() argument 720 if (stat->count != 0) in dump_stat() 721 average_time_ms = stat->total_ms / stat->count; in dump_stat() 725 (unsigned long long)stat->total_ms, in dump_stat() 726 (unsigned long long)stat->max_ms, in dump_stat()
|
/system/extras/tests/directiotest/ |
D | directiotest.c | 175 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/ |
D | opentest.c | 32 struct stat statbuf; in main() 49 if (stat(dir, &statbuf)) { in main()
|
/system/bt/btif/src/ |
D | btif_sock_l2cap.c | 842 bt_status_t stat = BT_STATUS_SUCCESS; in btSock_start_l2cap_server_l() local 855 stat = BT_STATUS_FAIL; in btSock_start_l2cap_server_l() 864 stat = BT_STATUS_FAIL; in btSock_start_l2cap_server_l() 870 stat = BT_STATUS_FAIL; in btSock_start_l2cap_server_l() 877 stat = BT_STATUS_FAIL; in btSock_start_l2cap_server_l() 884 stat = BT_STATUS_FAIL; in btSock_start_l2cap_server_l() 888 return stat; in btSock_start_l2cap_server_l() 894 bt_status_t stat; in btsock_l2cap_listen_or_connect() local 929 stat = BT_STATUS_SUCCESS; in btsock_l2cap_listen_or_connect() 940 stat = btSock_start_l2cap_server_l(sock); in btsock_l2cap_listen_or_connect() [all …]
|
/system/core/tzdatacheck/ |
D | tzdatacheck.cpp | 82 static int deleteFn(const char* fpath, const struct stat*, int typeflag, struct FTW*) { in deleteFn() argument 117 struct stat buf; in deleteDir() 118 if (stat(dirToDelete.c_str(), &buf) == 0) { in deleteDir()
|
/system/extras/boot_control_copy/ |
D | boot_control_copy.c | 45 struct stat statbuf; in get_dev_t_for_partition() 63 struct stat statbuf; in module_getCurrentSlot() 66 if (stat("/system", &statbuf) != 0) { in module_getCurrentSlot()
|
/system/core/cpio/ |
D | mkbootfs.c | 57 static void fix_stat(const char *path, struct stat *s) in fix_stat() 89 static void _eject(struct stat *s, char *out, int olen, char *data, unsigned datasize) in _eject() 141 struct stat s; in _eject_trailer() 232 struct stat s; in _archive()
|
/system/update_engine/ |
D | hardware_chromeos.cc | 82 struct stat statbuf; in IsOOBEComplete() 83 if (stat(kOOBECompletedMarker, &statbuf) != 0) { in IsOOBEComplete()
|