Home
last modified time | relevance | path

Searched refs:st_mode (Results 1 – 25 of 70) sorted by relevance

123

/system/core/adb/sysdeps/
Dstat_test.cpp31 ASSERT_FALSE(S_ISREG(st.st_mode)); in TEST()
32 ASSERT_TRUE(S_ISDIR(st.st_mode)); in TEST()
35 ASSERT_TRUE(S_ISDIR(st.st_mode)); in TEST()
39 ASSERT_TRUE(S_ISDIR(st.st_mode)); in TEST()
55 ASSERT_TRUE(S_ISREG(st.st_mode)); in TEST()
56 ASSERT_FALSE(S_ISDIR(st.st_mode)); in TEST()
/system/core/cpio/
Dmkbootfs.c75 s->st_mode = p->mode | (s->st_mode & ~07777); in fix_stat()
81 s->st_mode = empty_path_config->mode | (s->st_mode & ~07777); in fix_stat()
84 unsigned st_mode = s->st_mode; in fix_stat() local
85 int is_dir = S_ISDIR(s->st_mode) || strcmp(path, TRAILER) == 0; in fix_stat()
86 fs_config(path, is_dir, target_out_path, &s->st_uid, &s->st_gid, &st_mode, &capabilities); in fix_stat()
87 s->st_mode = (typeof(s->st_mode)) st_mode; in fix_stat()
110 s->st_mode, in _eject()
243 if(S_ISREG(s.st_mode)){ in _archive()
261 } else if(S_ISDIR(s.st_mode)) { in _archive()
264 } else if(S_ISLNK(s.st_mode)) { in _archive()
[all …]
/system/core/libcutils/
Dfs.cpp62 type_ok = prepare_as_dir ? S_ISDIR(sb.st_mode) : S_ISREG(sb.st_mode); in fs_prepare_path_impl()
69 mode_match = ((sb.st_mode & ALL_PERMS) == mode); in fs_prepare_path_impl()
81 path, mode, (sb.st_mode & ALL_PERMS)); in fs_prepare_path_impl()
241 if (S_ISLNK(sb.st_mode)) { in fs_mkdirs()
246 if (!S_ISDIR(sb.st_mode)) { in fs_mkdirs()
Dashmem-dev.cpp248 if (!S_ISCHR(st.st_mode) || !st.st_rdev) { in __ashmem_open_locked()
280 if (S_ISCHR(st.st_mode) && st.st_rdev) { in __ashmem_is_ashmem()
305 fd, st.st_mode, major(st.st_rdev), minor(st.st_rdev), in __ashmem_is_ashmem()
310 fd, st.st_mode, major(st.st_rdev), minor(st.st_rdev), in __ashmem_is_ashmem()
Dashmem-host.cpp78 if (!(buf.st_nlink == 0 && S_ISREG(buf.st_mode))) { in ashmem_get_size_region()
/system/core/adb/client/
Dfile_sync_client.cpp341 st->st_mode = msg.stat_v2.mode; in FinishStat()
366 st->st_mode = msg.stat_v1.mode; in FinishStat()
659 if (S_ISLNK(st->st_mode)) { in sync_stat_fallback()
667 st->st_mode &= ~S_IFMT; in sync_stat_fallback()
669 st->st_mode |= S_IFDIR; in sync_stat_fallback()
671 st->st_mode |= S_IFREG; in sync_stat_fallback()
827 copyinfo ci(lpath, rpath, de->d_name, st.st_mode); in local_build_list()
828 if (S_ISDIR(st.st_mode)) { in local_build_list()
831 if (!should_push_file(st.st_mode)) { in local_build_list()
832 sc.Warning("skipping special file '%s' (mode = 0o%o)", lpath.c_str(), st.st_mode); in local_build_list()
[all …]
Dauth.cpp178 if (S_ISREG(st.st_mode)) { in load_keys()
180 } else if (S_ISDIR(st.st_mode)) { in load_keys()
213 LOG(ERROR) << "unexpected type for '" << path << "': 0x" << std::hex << st.st_mode; in load_keys()
/system/core/run-as/
Drun-as.cpp83 if (!S_ISDIR(st.st_mode)) { in check_directory()
84 error(1, 0, "%s not a directory: %o", path, st.st_mode); in check_directory()
93 if ((st.st_mode & (S_IROTH | S_IWOTH)) != 0) { in check_directory()
94 error(1, 0, "%s readable or writable by others: %o", path, st.st_mode); in check_directory()
/system/core/libnativebridge/tests/
DCodeCacheCreate_test.cpp42 ASSERT_TRUE(S_ISDIR(st.st_mode)); in TEST_F()
DCodeCacheExists_test.cpp45 ASSERT_TRUE(S_ISDIR(st.st_mode)); in TEST_F()
/system/core/adb/sysdeps/win32/
Dstat.cpp58 if (!S_ISDIR(st.st_mode)) { in adb_stat()
/system/core/libdiskconfig/
Ddiskconfig.c250 if (S_ISBLK(stat.st_mode) && ((rv = ioctl(fd, BLKRRPART, NULL)) < 0)) { in sync_ptable()
298 if (S_ISBLK(stat.st_mode)) { in validate()
320 } else if (S_ISREG(stat.st_mode)) { in validate()
372 if (S_ISBLK(stat.st_mode) && total_size > disk_size) { in validate()
/system/extras/ext4_utils/
Dext4_utils.cpp234 return S_ISBLK(st.st_mode); in is_block_device_fd()
252 if (S_ISREG(buf.st_mode)) in get_file_size()
254 else if (S_ISBLK(buf.st_mode)) in get_file_size()
/system/core/init/
Dmount_handler.cpp85 if (stat(queue.c_str(), &sb) || !S_ISDIR(sb.st_mode)) value = ""; in SetMountProperty()
86 if (stat(entry.mount_point.c_str(), &sb) || !S_ISDIR(sb.st_mode)) value = ""; in SetMountProperty()
Dpersistent_properties.cpp86 if (((sb.st_mode & (S_IRWXG | S_IRWXO)) != 0) || sb.st_uid != 0 || sb.st_gid != 0 || in LoadLegacyPersistentProperties()
90 << " mode=" << std::oct << sb.st_mode << ")"; in LoadLegacyPersistentProperties()
/system/apex/apexd/
Dapexd_private.cpp53 is_dir = S_ISDIR(buf.st_mode); in BindMount()
/system/extras/tests/storage/
Dopentest.c54 if (! S_ISDIR(statbuf.st_mode)) { in main()
Dwipe_blkdev.c115 if (!S_ISBLK(statbuf.st_mode)) { in main()
/system/core/adb/daemon/
Dfile_sync_service.cpp140 msg.stat_v1.mode = st.st_mode; in do_lstat_v1()
164 msg.stat_v2.mode = st.st_mode; in do_stat_v2()
192 msg.dent.mode = st.st_mode; in do_list()
416 bool do_unlink = (lstat(path.c_str(), &st) == -1) || S_ISREG(st.st_mode) || in do_send()
417 (S_ISLNK(st.st_mode) && !S_ISLNK(mode)); in do_send()
/system/nfc/src/adaptation/
Dnfc_config.cc40 if (S_ISREG(file_stat.st_mode)) return path; in findConfigPath()
/system/core/libunwindstack/tools/
Dunwind_symbols.cpp44 if (!S_ISREG(st.st_mode)) { in main()
/system/core/base/
Dfile.cpp332 bool file_type_removable = (result == 0 && S_ISREG(st.st_mode)); in RemoveFileIfExists()
335 bool file_type_removable = (result == 0 && (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode))); in RemoveFileIfExists()
/system/extras/simpleperf/app_api/cpp/
Dsimpleperf.cpp266 if (S_ISREG(st.st_mode) && (st.st_mode & S_IXUSR)) { in IsExecutableFile()
334 if (stat(simpleperf_data_dir_.c_str(), &st) == 0 && S_ISDIR(st.st_mode)) { in CreateSimpleperfDataDir()
/system/update_engine/payload_consumer/
Dfile_descriptor.cc78 if (!S_ISBLK(stbuf.st_mode)) in BlockDevSize()
/system/core/libziparchive/
Dunzip.cpp64 if (stat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode)) return true; in MakeDirectoryHierarchy()
177 if (stat(name.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode)) return; in ExtractOne()

123