Home
last modified time | relevance | path

Searched refs:st_mode (Results 1 – 25 of 69) 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.c76 s->st_mode = p->mode | (s->st_mode & ~07777); in fix_stat()
82 s->st_mode = empty_path_config->mode | (s->st_mode & ~07777); in fix_stat()
85 unsigned st_mode = s->st_mode; in fix_stat() local
86 int is_dir = S_ISDIR(s->st_mode) || strcmp(path, TRAILER) == 0; in fix_stat()
87 fs_config(path, is_dir, target_out_path, &s->st_uid, &s->st_gid, &st_mode, &capabilities); in fix_stat()
88 s->st_mode = (typeof(s->st_mode)) st_mode; in fix_stat()
111 s->st_mode, in _eject()
244 if(S_ISREG(s.st_mode)){ in _archive()
262 } else if(S_ISDIR(s.st_mode)) { in _archive()
265 } 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.cpp230 if (!S_ISCHR(st.st_mode) || !st.st_rdev) { in __ashmem_open_locked()
262 if (S_ISCHR(st.st_mode) && st.st_rdev) { in __ashmem_is_ashmem()
287 fd, st.st_mode, major(st.st_rdev), minor(st.st_rdev), in __ashmem_is_ashmem()
292 fd, st.st_mode, major(st.st_rdev), minor(st.st_rdev), in __ashmem_is_ashmem()
Dashmem-host.cpp48 if (!(buf->st_nlink == 0 && S_ISREG(buf->st_mode))) { in ashmem_validate_stat()
/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/adb/client/
Dfile_sync_client.cpp488 st->st_mode = msg.stat_v2.mode; in FinishStat()
513 st->st_mode = msg.stat_v1.mode; in FinishStat()
1012 if (S_ISLNK(st->st_mode)) { in sync_stat_fallback()
1020 st->st_mode &= ~S_IFMT; in sync_stat_fallback()
1022 st->st_mode |= S_IFDIR; in sync_stat_fallback()
1024 st->st_mode |= S_IFREG; in sync_stat_fallback()
1296 copyinfo ci(lpath, rpath, de->d_name, st.st_mode); in local_build_list()
1297 if (S_ISDIR(st.st_mode)) { in local_build_list()
1300 if (!should_push_file(st.st_mode)) { in local_build_list()
1301 sc.Warning("skipping special file '%s' (mode = 0o%o)", lpath.c_str(), st.st_mode); in local_build_list()
[all …]
/system/core/adb/sysdeps/win32/
Dstat.cpp58 if (!S_ISDIR(st.st_mode)) { in adb_stat()
/system/core/fs_mgr/libfiemap/
Dutility.cpp84 if (S_ISBLK(given.st_mode) && S_ISBLK(userdata.st_mode) && in GetDevicePathForFile()
/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.cpp236 return S_ISBLK(st.st_mode); in is_block_device_fd()
254 if (S_ISREG(buf.st_mode)) in get_file_size()
256 else if (S_ISBLK(buf.st_mode)) in get_file_size()
/system/core/init/
Dmount_handler.cpp84 if (stat(queue.c_str(), &sb) || !S_ISDIR(sb.st_mode)) value = ""; in SetMountProperty()
85 if (stat(entry.mount_point.c_str(), &sb) || !S_ISDIR(sb.st_mode)) value = ""; in SetMountProperty()
Dpersistent_properties.cpp87 if (((sb.st_mode & (S_IRWXG | S_IRWXO)) != 0) || sb.st_uid != 0 || sb.st_gid != 0 || in LoadLegacyPersistentProperties()
91 << " mode=" << std::oct << sb.st_mode << ")"; in LoadLegacyPersistentProperties()
/system/apex/apexd/
Dapexd_private.cpp56 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/libmodprobe/
Dlibmodprobe_ext.cpp96 if (!S_ISREG(fileStat.st_mode)) { in ModuleExists()
/system/core/libunwindstack/tools/
Dunwind_symbols.cpp44 if (!S_ISREG(st.st_mode)) { in main()
/system/bt/gd/
Dsetup.py55 current_mode = os.stat(file).st_mode
/system/nfc/src/adaptation/
Dnfc_config.cc39 if (S_ISREG(file_stat.st_mode)) return path; in searchConfigPath()
/system/update_engine/payload_consumer/
Dfile_descriptor.cc78 if (!S_ISBLK(stbuf.st_mode)) in BlockDevSize()
/system/libbase/
Dfile.cpp370 bool file_type_removable = (result == 0 && S_ISREG(st.st_mode)); in RemoveFileIfExists()
373 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.cpp275 if (S_ISREG(st.st_mode) && (st.st_mode & S_IXUSR)) { in IsExecutableFile()
387 if (stat(simpleperf_data_dir_.c_str(), &st) == 0 && S_ISDIR(st.st_mode)) { in CreateSimpleperfDataDir()
/system/update_engine/common/
Dutils.cc375 if (S_ISREG(stbuf.st_mode)) in FileSize()
377 if (S_ISBLK(stbuf.st_mode)) in FileSize()
489 return lstat(path, &stbuf) == 0 && S_ISLNK(stbuf.st_mode) != 0; in IsSymlink()
606 if (!S_ISDIR(stdir.st_mode)) in IsMountpoint()
615 return S_ISDIR(stparent.st_mode) && in IsMountpoint()
/system/core/adb/daemon/
Dfile_sync_service.cpp148 msg.stat_v1.mode = st.st_mode; in do_lstat_v1()
172 msg.stat_v2.mode = st.st_mode; in do_stat_v2()
210 msg.mode = st.st_mode; in do_list()
504 do_unlink = (lstat(path.c_str(), &st) == -1) || S_ISREG(st.st_mode) || in send_impl()
505 (S_ISLNK(st.st_mode) && !S_ISLNK(mode)); in send_impl()

123