Home
last modified time | relevance | path

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

12345678910>>...22

/external/python/cpython2/Lib/test/
Dtest_stat.py63 st_mode = os.lstat(fname).st_mode
65 st_mode = os.stat(fname).st_mode
66 return st_mode
90 st_mode = self.get_mode()
91 self.assertS_IS("REG", st_mode)
92 self.assertEqual(stat.S_IMODE(st_mode),
96 st_mode = self.get_mode()
97 self.assertS_IS("REG", st_mode)
98 self.assertEqual(stat.S_IMODE(st_mode),
102 st_mode = self.get_mode()
[all …]
/external/toybox/toys/other/
Dlsattr.c85 if(!S_ISREG(sb->st_mode) && !S_ISDIR(sb->st_mode)) { in ext2_getflag()
98 if (!stat(path, &sb) && !S_ISREG(sb.st_mode) && !S_ISDIR(sb.st_mode)) { in print_file_attr()
150 if (S_ISDIR(root->st.st_mode) && !root->parent) in retell_dir()
157 if (S_ISDIR(root->st.st_mode) && (toys.optflags & FLAG_R) in retell_dir()
176 else if (S_ISDIR(sb.st_mode) && !(toys.optflags & FLAG_d)) in lsattr_main()
195 if (!S_ISREG(sb->st_mode) && !S_ISDIR(sb->st_mode)) { in ext2_setflag()
264 if ((S_ISLNK(root->st.st_mode) && chattr.recursive) in update_attr()
265 || (!S_ISREG(root->st.st_mode) && !S_ISLNK(root->st.st_mode) in update_attr()
266 && !S_ISDIR(root->st.st_mode))) in update_attr()
287 if (!S_ISDIR(root->st.st_mode)) fval &= ~FS_DIRSYNC_FL; in update_attr()
[all …]
/external/toybox/toys/pending/
Dtest.c65 nolink = !S_ISLNK(st.st_mode); in test_main()
68 if (id == 0) toys.exitval = !S_ISBLK(st.st_mode); // b in test_main()
69 else if (id == 1) toys.exitval = !S_ISCHR(st.st_mode); // c in test_main()
70 else if (id == 2) toys.exitval = !S_ISDIR(st.st_mode); // d in test_main()
72 else if (id == 4) toys.exitval = !S_ISREG(st.st_mode); // f in test_main()
73 else if (id == 5) toys.exitval = !(st.st_mode & S_ISGID); // g in test_main()
75 else if (id == 8) toys.exitval = !S_ISFIFO(st.st_mode); // p in test_main()
76 else if (id == 9) toys.exitval = !S_ISSOCK(st.st_mode); // S in test_main()
78 else toys.exitval = !(st.st_mode & S_ISUID); // u in test_main()
Ddiff.c489 if (S_ISDIR(node->st.st_mode) && !node->parent) { //add root dirs. in list_dir()
494 if (S_ISDIR(node->st.st_mode) && (toys.optflags & FLAG_r)) { in list_dir()
503 return S_ISDIR(node->st.st_mode) ? 0 : (DIRTREE_RECURSE|DIRTREE_SYMFOLLOW); in list_dir()
679 if (S_ISDIR(st[0].st_mode) && S_ISDIR(st[1].st_mode)) in create_empty_entry()
681 else if (!S_ISREG(st[0].st_mode) && !S_ISDIR(st[0].st_mode)) in create_empty_entry()
684 else if (!S_ISREG(st[1].st_mode) && !S_ISDIR(st[1].st_mode)) in create_empty_entry()
687 else if (S_ISDIR(st[0].st_mode) != S_ISDIR(st[1].st_mode)) { in create_empty_entry()
688 if (S_ISDIR(st[0].st_mode)) in create_empty_entry()
789 && (S_ISDIR(st[0].st_mode) || S_ISDIR(st[1].st_mode))) in diff_main()
798 if (S_ISDIR(st[0].st_mode) && S_ISDIR(st[1].st_mode)) { in diff_main()
[all …]
/external/autotest/client/site_tests/login_UserPolicyKeys/
Dlogin_UserPolicyKeys.py23 return info.st_mode & stat.S_IRUSR
25 return info.st_mode & stat.S_IRGRP
26 return info.st_mode & stat.S_IROTH
32 return info.st_mode & stat.S_IXUSR
34 return info.st_mode & stat.S_IXGRP
35 return info.st_mode & stat.S_IXOTH
46 if not stat.S_ISREG(info.st_mode):
50 (key_file, oct(info.st_mode)))
58 mode = stat.S_IMODE(info.st_mode)
61 (current, oct(info.st_mode)))
/external/toybox/toys/posix/
Dcp.c137 if (S_ISDIR(try->st.st_mode) && try->again) { in cp_node()
143 if (S_ISLNK(try->st.st_mode) && (flags & FLAG_d)) flags |= FLAG_r; in cp_node()
160 if (!faccessat(cfd, catch, F_OK, 0) && !S_ISDIR(cst.st_mode)) { in cp_node()
163 if (S_ISDIR(try->st.st_mode)) { in cp_node()
192 if (S_ISDIR(try->st.st_mode)) { in cp_node()
208 if (!mkdirat(cfd, catch, try->st.st_mode | 0200) || errno == EEXIST) in cp_node()
210 if (!fstat(try->extra, &st2) && S_ISDIR(st2.st_mode)) in cp_node()
247 } else if (!S_ISREG(try->st.st_mode) in cp_node()
253 if (S_ISLNK(try->st.st_mode) in cp_node()
256 : !mknodat(cfd, catch, try->st.st_mode, try->st.st_rdev)) in cp_node()
[all …]
Dfile.c302 if (fd || S_ISREG(sb.st_mode)) { in file_main()
309 } else if (S_ISFIFO(sb.st_mode)) what = "fifo"; in file_main()
310 else if (S_ISBLK(sb.st_mode)) what = "block special"; in file_main()
311 else if (S_ISCHR(sb.st_mode)) what = "character special"; in file_main()
312 else if (S_ISDIR(sb.st_mode)) what = "directory"; in file_main()
313 else if (S_ISSOCK(sb.st_mode)) what = "socket"; in file_main()
314 else if (S_ISLNK(sb.st_mode)) what = "symbolic link"; in file_main()
/external/ltp/testcases/kernel/syscalls/dup/
Ddup07.c70 if (retbuf.st_mode != dupbuf.st_mode) { in main()
92 if (retbuf.st_mode != dupbuf.st_mode) { in main()
115 if (retbuf.st_mode != dupbuf.st_mode) { in main()
/external/vboot_reference/futility/
Dfile_type.c94 if (S_ISREG(sb.st_mode) || S_ISBLK(sb.st_mode)) { in futil_file_type()
108 } else if (S_ISDIR(sb.st_mode)) { in futil_file_type()
110 } else if (S_ISCHR(sb.st_mode)) { in futil_file_type()
112 } else if (S_ISFIFO(sb.st_mode)) { in futil_file_type()
114 } else if (S_ISSOCK(sb.st_mode)) { in futil_file_type()
/external/syslinux/com32/rosh/
Drosh.c578 int rosh_ls_de_size_mode(const char *filestr, struct dirent *de, mode_t * st_mode) in rosh_ls_de_size_mode() argument
611 *st_mode = fdstat.st_mode; in rosh_ls_de_size_mode()
738 void rosh_st_mode_am2str(mode_t st_mode, char *st_mode_str) in rosh_st_mode_am2str() argument
740 st_mode_str[0] = ((st_mode & S_IROTH) ? 'r' : '-'); in rosh_st_mode_am2str()
741 st_mode_str[1] = ((st_mode & S_IWOTH) ? 'w' : '-'); in rosh_st_mode_am2str()
742 st_mode_str[2] = ((st_mode & S_IXOTH) ? 'x' : '-'); in rosh_st_mode_am2str()
749 void rosh_st_mode2str(mode_t st_mode, char *st_mode_str) in rosh_st_mode2str() argument
751 st_mode_str[0] = rosh_d_type2char_lspre(IFTODT(st_mode)); in rosh_st_mode2str()
752 rosh_st_mode_am2str((st_mode & S_IRWXU) >> 6, st_mode_str + 1); in rosh_st_mode2str()
753 rosh_st_mode_am2str((st_mode & S_IRWXG) >> 3, st_mode_str + 4); in rosh_st_mode2str()
[all …]
/external/f2fs-tools/fsck/
Dsload.c109 dentries[i].mode = stat.st_mode & in build_directory()
113 handle_selabel(dentries + i, S_ISDIR(stat.st_mode), in build_directory()
118 dentries[i].path, stat.st_mode) < 0) in build_directory()
125 if (S_ISREG(stat.st_mode)) { in build_directory()
127 } else if (S_ISDIR(stat.st_mode)) { in build_directory()
129 } else if (S_ISCHR(stat.st_mode)) { in build_directory()
131 } else if (S_ISBLK(stat.st_mode)) { in build_directory()
133 } else if (S_ISFIFO(stat.st_mode)) { in build_directory()
135 } else if (S_ISSOCK(stat.st_mode)) { in build_directory()
137 } else if (S_ISLNK(stat.st_mode)) { in build_directory()
/external/ipsec-tools/src/racoon/
Dsafefile.c73 switch (s.st_mode & S_IFMT) {
79 (s.st_mode & S_IFMT));
85 if ((s.st_mode & S_IRWXG) != 0 || (s.st_mode & S_IRWXO) != 0) {
/external/kernel-headers/original/uapi/asm-x86/asm/
Dstat.h12 unsigned short st_mode; member
47 unsigned int st_mode; member
87 unsigned int st_mode; member
119 unsigned short st_mode; member
/external/syslinux/linux/
Dsyslinux.c117 if (!S_ISBLK(st.st_mode)) { in do_mount()
167 if (!S_ISBLK(st.st_mode)) { in do_mount()
308 if (!S_ISBLK(st.st_mode) && !S_ISREG(st.st_mode) && !S_ISCHR(st.st_mode)) { in main()
312 if (opt.offset && S_ISBLK(st.st_mode)) { in main()
348 if (stat(".", &dst) || !S_ISDIR(dst.st_mode) || in main()
349 (dst.st_mode & TMP_MODE) != TMP_MODE) { in main()
369 if (lstat(mntname, &dst) || dst.st_mode != (S_IFDIR | 0000) || in main()
/external/syslinux/com32/lib/sys/
Dfstat.c51 buf->st_mode = S_IFSOCK | 0444; in fstat()
54 buf->st_mode = S_IFREG | 0444; in fstat()
58 buf->st_mode = S_IFCHR | 0666; in fstat()
/external/openssh/regress/
Dcheck-perm.c64 if (st.st_uid != 0 || (st.st_mode & 022) != 0) in safely_chroot()
68 if (!S_ISDIR(st.st_mode)) in safely_chroot()
110 if (!S_ISREG(stp->st_mode)) { in auth_secure_path()
115 (stp->st_mode & 022) != 0) { in auth_secure_path()
131 (st.st_mode & 022) != 0) { in auth_secure_path()
/external/libchrome/base/files/
Dfile_util_posix.cc106 if (S_ISLNK(stat_info.st_mode)) { in VerifySpecificPathControlledByUser()
118 if ((stat_info.st_mode & S_IWGRP) && in VerifySpecificPathControlledByUser()
125 if (stat_info.st_mode & S_IWOTH) { in VerifySpecificPathControlledByUser()
213 if (!S_ISDIR(file_info.st_mode)) in DeleteFile()
302 S_ISDIR(to_path_stat.st_mode)) { in CopyDirectory()
311 DCHECK(recursive || S_ISDIR(from_stat.st_mode)); in CopyDirectory()
325 if (S_ISDIR(from_stat.st_mode)) { in CopyDirectory()
327 (from_stat.st_mode & 01777) | S_IRUSR | S_IXUSR | S_IWUSR) != in CopyDirectory()
334 } else if (S_ISREG(from_stat.st_mode)) { in CopyDirectory()
386 return S_ISDIR(file_info.st_mode); in DirectoryExists()
[all …]
/external/squashfs-tools/squashfs-tools/
Dandroid.c49 mode_t stat_file_type_mask = stat->st_mode & S_IFMT; in android_fs_config()
52 fs_config_func(path, S_ISDIR(stat->st_mode), target_out_path, in android_fs_config()
56 stat->st_mode = mode; in android_fs_config()
58 stat->st_mode |= stat_file_type_mask; in android_fs_config()
Daction.c851 static int file_type_match(int st_mode, int type) in file_type_match() argument
855 return S_ISDIR(st_mode); in file_type_match()
857 return S_ISREG(st_mode); in file_type_match()
859 return S_ISREG(st_mode) || S_ISDIR(st_mode) || in file_type_match()
860 S_ISCHR(st_mode) || S_ISBLK(st_mode) || in file_type_match()
861 S_ISFIFO(st_mode) || S_ISSOCK(st_mode); in file_type_match()
863 return S_ISLNK(st_mode); in file_type_match()
884 int st_mode = dir_ent->inode->buf.st_mode; in eval_actions() local
897 if (!file_type_match(st_mode, action->action->file_types)) in eval_actions()
1411 static int mode_execute(struct mode_data *mode_data, int st_mode) in mode_execute() argument
[all …]
/external/kernel-headers/original/uapi/asm-arm/asm/
Dstat.h7 unsigned short st_mode; member
28 unsigned short st_mode; member
62 unsigned int st_mode; member
/external/chromium-trace/catapult/dependency_manager/dependency_manager/
Ddependency_manager_util_unittest.py87 stat.S_IRUSR & stat.S_IMODE(os.stat(read_only_path).st_mode))
89 stat.S_IRUSR & stat.S_IMODE(os.stat(sub_read_only_path).st_mode))
91 stat.S_IRUSR & stat.S_IMODE(os.stat(writable_path).st_mode))
93 stat.S_IWUSR & stat.S_IMODE(os.stat(writable_path).st_mode))
95 stat.S_IRUSR & stat.S_IMODE(os.stat(sub_writable_path).st_mode))
97 stat.S_IWUSR & stat.S_IMODE(os.stat(sub_writable_path).st_mode))
101 stat.S_IRWXU & stat.S_IMODE(os.stat(executable_path).st_mode))
104 stat.S_IRWXU & stat.S_IMODE(os.stat(sub_executable_path).st_mode))
/external/kernel-headers/original/uapi/asm-mips/asm/
Dstat.h22 mode_t st_mode; member
57 mode_t st_mode; member
98 mode_t st_mode; member
/external/ltp/testcases/kernel/syscalls/open/
Dopen10.c149 if (buf.st_mode & S_ISGID) { in main()
187 if (!(buf.st_mode & S_ISGID)) { in main()
243 if (buf.st_mode & S_ISGID) { in main()
272 if (!(buf.st_mode & S_ISGID)) { in main()
318 if (buf.st_mode & S_ISGID) { in main()
355 if (!(buf.st_mode & S_ISGID)) { in main()
401 if (!(buf.st_mode & S_ISGID)) { in main()
/external/ltp/testcases/kernel/syscalls/creat/
Dcreat08.c160 if (buf.st_mode & S_ISGID) { in main()
199 if (!(buf.st_mode & S_ISGID)) { in main()
257 if (buf.st_mode & S_ISGID) { in main()
285 if (!(buf.st_mode & S_ISGID)) { in main()
329 if (buf.st_mode & S_ISGID) { in main()
366 if (!(buf.st_mode & S_ISGID)) { in main()
407 if (!(buf.st_mode & S_ISGID)) { in main()
/external/ltp/testcases/kernel/syscalls/fchmod/
Dfchmod07.c132 stat_buf.st_mode &= ~S_IFREG; in main()
138 if (stat_buf.st_mode == mode) { in main()
146 TESTFILE, stat_buf.st_mode, in main()

12345678910>>...22