/third_party/python/Lib/test/ |
H A D | test_stat.py | 93 st_mode = os.lstat(fname).st_mode 95 st_mode = os.stat(fname).st_mode 96 modestr = self.statmod.filemode(st_mode) 97 return st_mode, modestr 122 st_mode, modestr = self.get_mode() 124 self.assertS_IS("REG", st_mode) 125 self.assertEqual(self.statmod.S_IMODE(st_mode), 129 st_mode, modest [all...] |
/third_party/libuv/test/ |
H A D | test-pipe-set-fchmod.c | 54 ASSERT(stat_buf.st_mode & S_IRUSR); in TEST_IMPL() 55 ASSERT(stat_buf.st_mode & S_IRGRP); in TEST_IMPL() 56 ASSERT(stat_buf.st_mode & S_IROTH); in TEST_IMPL() 63 ASSERT(stat_buf.st_mode & S_IWUSR); in TEST_IMPL() 64 ASSERT(stat_buf.st_mode & S_IWGRP); in TEST_IMPL() 65 ASSERT(stat_buf.st_mode & S_IWOTH); in TEST_IMPL() 72 ASSERT(stat_buf.st_mode & S_IRUSR); in TEST_IMPL() 73 ASSERT(stat_buf.st_mode & S_IRGRP); in TEST_IMPL() 74 ASSERT(stat_buf.st_mode & S_IROTH); in TEST_IMPL() 75 ASSERT(stat_buf.st_mode in TEST_IMPL() [all...] |
/third_party/toybox/toys/other/ |
H A D | lsattr.c | 85 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) in update_attr() [all...] |
H A D | stat.c | 78 if (type == 'a') out('o', stat->st_mode&~S_IFMT); in print_stat() 82 mode_to_string(stat->st_mode, str); in print_stat() 93 else if (type == 'f') out('x', stat->st_mode); in print_stat() 97 int i, filetype = stat->st_mode & S_IFMT; in print_stat() 118 if (S_ISLNK(stat->st_mode)) in print_stat()
|
H A D | switch_root.c | 34 if (S_ISDIR(node->st.st_mode)) { in del_node() 76 if (stat(*cmdline, &st1) || !S_ISREG(st1.st_mode) || !(st1.st_mode&0100)) { in switch_root_main()
|
/third_party/toybox/porting/liteos_a/toys/posix/ |
H A D | cp.c | 121 if (S_ISDIR(try->st.st_mode) && try->again) { in cp_node() 127 if (S_ISLNK(try->st.st_mode) && (flags & FLAG_d)) flags |= FLAG_r; in cp_node() 133 if (!faccessat(cfd, catch, F_OK, 0) && !S_ISDIR(cst.st_mode)) { in cp_node() 136 if (S_ISDIR(try->st.st_mode)) { in cp_node() 165 if (S_ISDIR(try->st.st_mode)) { in cp_node() 181 if (!mkdirat(cfd, catch, try->st.st_mode | 0200) || errno == EEXIST) in cp_node() 183 if (!fstat(try->extra, &st2) && S_ISDIR(st2.st_mode)) in cp_node() 219 } else if (!S_ISREG(try->st.st_mode) in cp_node() 225 if (S_ISLNK(try->st.st_mode) in cp_node() 229 : !mknodat(cfd, catch, try->st.st_mode, tr in cp_node() [all...] |
H A D | rm.c | 36 if (S_ISREG(stat_info.st_mode) || S_ISLNK(stat_info.st_mode)) { in toybox_cmd_do_rmdir() 75 int fd=dirtree_parentfd(try), dir=S_ISDIR(try->st.st_mode), or=0; in do_rm() 89 && (!S_ISLNK(try->st.st_mode) && faccessat(fd, try->name, W_OK, 0))) or++; in do_rm()
|
/third_party/toybox/toys/posix/ |
H A D | cp.c | 137 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() 246 } else if (!S_ISREG(try->st.st_mode) in cp_node() 252 if (S_ISLNK(try->st.st_mode) in cp_node() 256 : !mknodat(cfd, catch, try->st.st_mode, tr in cp_node() [all...] |
H A D | ln.c | 48 i = S_ISDIR(buf.st_mode); in ln_main() 52 } else buf.st_mode = 0; in ln_main() 58 if (S_ISDIR(buf.st_mode)) new = xmprintf("%s/%s", dest, basename(try)); in ln_main()
|
H A D | cpio.c | 197 if (fd != -1 && !fstat(fd, &st) && (st.st_mode&S_IFMT) == (mode&S_IFMT)) in cpio_main() 233 if (lstat(name, &st) || (S_ISREG(st.st_mode) in cpio_main() 240 if (!S_ISREG(st.st_mode) && !S_ISLNK(st.st_mode)) st.st_size = 0; in cpio_main() 245 (int)st.st_ino, st.st_mode, st.st_uid, st.st_gid, (int)st.st_nlink, in cpio_main() 258 if (S_ISLNK(st.st_mode)) { in cpio_main()
|
/third_party/ltp/testcases/kernel/syscalls/dup/ |
H A D | dup07.c | 70 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()
|
/third_party/ltp/testcases/kernel/syscalls/dup2/ |
H A D | dup202.c | 100 if (oldbuf.st_mode != newbuf.st_mode) in run() 102 oldbuf.st_mode, newbuf.st_mode); in run() 105 oldbuf.st_mode, newbuf.st_mode); in run()
|
/third_party/ltp/testcases/kernel/syscalls/chmod/ |
H A D | chmod01.c | 47 stat_buf.st_mode &= ~tc->mode_mask; in verify_chmod() 49 if (stat_buf.st_mode == (unsigned int)mode) { in verify_chmod() 51 *tc->name, stat_buf.st_mode); in verify_chmod() 54 *tc->name, stat_buf.st_mode); in verify_chmod()
|
H A D | chmod03.c | 50 if ((stat_buf.st_mode & PERMS) != PERMS) { in verify_chmod() 52 tc->name, stat_buf.st_mode); in verify_chmod() 55 tc->name, stat_buf.st_mode); in verify_chmod()
|
/third_party/lz4/programs/ |
H A D | util.h | 132 # define UTIL_STAT_MODE_ISREG(st_mode) ((st_mode) & S_IFREG) 137 # define UTIL_STAT_MODE_ISREG(st_mode) ((st_mode) & S_IFREG) 142 # define UTIL_STAT_MODE_ISREG(st_mode) (S_ISREG(st_mode)) 382 res += chmod(filename, statbuf->st_mode & 07777); /* Copy file permissions */ in UTIL_setFileStat() 394 if (r || !(statbuf->st_mode & S_IFREG)) return 0; /* No good... */ in UTIL_getFDStat() 397 if (r || !S_ISREG(statbuf->st_mode)) return 0; /* No good... */ in UTIL_getFDStat() 407 if (r || !(statbuf->st_mode in UTIL_getFileStat() [all...] |
/third_party/ffmpeg/libavformat/ |
H A D | file.c | 161 ret |= st.st_mode&S_IRUSR ? mask&AVIO_FLAG_READ : 0; in file_check() 162 ret |= st.st_mode&S_IWUSR ? mask&AVIO_FLAG_WRITE : 0; in file_check() 234 h->is_streamed = !fstat(fd, &st) && S_ISFIFO(st.st_mode); in file_open() 256 return ret < 0 ? AVERROR(errno) : (S_ISFIFO(st.st_mode) ? 0 : st.st_size); in file_seek() 309 if (S_ISDIR(st.st_mode)) in file_read_dir() 311 else if (S_ISFIFO(st.st_mode)) in file_read_dir() 313 else if (S_ISCHR(st.st_mode)) in file_read_dir() 315 else if (S_ISBLK(st.st_mode)) in file_read_dir() 317 else if (S_ISLNK(st.st_mode)) in file_read_dir() 319 else if (S_ISSOCK(st.st_mode)) in file_read_dir() [all...] |
/third_party/f2fs-tools/fsck/ |
H A D | sload.c | 155 if (S_ISREG(stat.st_mode)) { in set_inode_metadata() 166 } else if (S_ISDIR(stat.st_mode)) { in set_inode_metadata() 168 } else if (S_ISCHR(stat.st_mode)) { in set_inode_metadata() 170 } else if (S_ISBLK(stat.st_mode)) { in set_inode_metadata() 172 } else if (S_ISFIFO(stat.st_mode)) { in set_inode_metadata() 174 } else if (S_ISSOCK(stat.st_mode)) { in set_inode_metadata() 176 } else if (S_ISLNK(stat.st_mode)) { in set_inode_metadata() 188 de->mode = stat.st_mode & in set_inode_metadata()
|
/third_party/eudev/src/shared/ |
H A D | mkdir.c | 42 if ((st.st_mode & 0007) > (mode & 0007) || in mkdir_safe_internal() 43 (st.st_mode & 0070) > (mode & 0070) || in mkdir_safe_internal() 44 (st.st_mode & 0700) > (mode & 0700) || in mkdir_safe_internal() 47 !S_ISDIR(st.st_mode)) in mkdir_safe_internal()
|
/third_party/ltp/testcases/kernel/fs/proc/ |
H A D | proc01.c | 267 if (S_ISLNK(statbuf.st_mode) && strcmp(obj, selfpath)) in readproc() 273 if (S_ISDIR(statbuf.st_mode) || !strcmp(obj, selfpath)) { in readproc() 338 if (!S_ISREG(statbuf.st_mode)) in readproc() 366 if ((statbuf.st_mode & S_IRUSR) == 0 && in readproc() 367 (statbuf.st_mode & S_IWUSR) != 0) { in readproc()
|
/third_party/toybox/toys/pending/ |
H A D | diff.c | 504 if (S_ISDIR(node->st.st_mode) && !node->parent) { //add root dirs. in list_dir() 509 if (S_ISDIR(node->st.st_mode) && (toys.optflags & FLAG_r)) { in list_dir() 518 return S_ISDIR(node->st.st_mode) ? 0 : (DIRTREE_RECURSE|DIRTREE_SYMFOLLOW); in list_dir() 759 if (S_ISDIR(st[0].st_mode) && S_ISDIR(st[1].st_mode)) in create_empty_entry() 761 else if (!S_ISREG(st[0].st_mode) && !S_ISDIR(st[0].st_mode)) in create_empty_entry() 764 else if (!S_ISREG(st[1].st_mode) && !S_ISDIR(st[1].st_mode)) in create_empty_entry() 767 else if (S_ISDIR(st[0].st_mode) ! in create_empty_entry() [all...] |
/third_party/musl/libc-test/src/functionalext/supplement/stat/stat_gtest/ |
H A D | stat_fstatat64_test.cpp | 30 EXPECT_EQ(0755 & mask, static_cast<mode_t>(st.st_mode) & mask); in HWTEST_F() 53 EXPECT_EQ(0755 & mask, static_cast<mode_t>(st.st_mode) & mask); in HWTEST_F() 76 EXPECT_EQ(0755 & mask, static_cast<mode_t>(st.st_mode) & mask); in HWTEST_F()
|
/third_party/alsa-lib/src/ucm/ |
H A D | ucm_exec.c | 61 if (!S_ISREG(st.st_mode) || !(st.st_mode & S_IEXEC)) in find_exec() 82 if (!S_ISREG(st.st_mode) in find_exec() 83 || !(st.st_mode & S_IEXEC)) in find_exec()
|
/third_party/lz4/tests/ |
H A D | abiTest.c | 126 if (r || !(statbuf.st_mode & S_IFREG)) return 0; /* No good... */ in getFileSize() 130 if (r || !S_ISREG(statbuf.st_mode)) return 0; /* No good... */ in getFileSize() 142 if (!r && (statbuf.st_mode & _S_IFDIR)) return 1; in isDirectory() 146 if (!r && S_ISDIR(statbuf.st_mode)) return 1; in isDirectory()
|
H A D | roundTripTest.c | 154 if (r || !(statbuf.st_mode & S_IFREG)) return 0; /* No good... */ in getFileSize() 158 if (r || !S_ISREG(statbuf.st_mode)) return 0; /* No good... */ in getFileSize() 170 if (!r && (statbuf.st_mode & _S_IFDIR)) return 1; in isDirectory() 174 if (!r && S_ISDIR(statbuf.st_mode)) return 1; in isDirectory()
|
/third_party/toybox/lib/ |
H A D | dirtree.c | 42 if (S_ISLNK(st.st_mode)) { in dirtree_add_node() 118 if (S_ISDIR(new->st.st_mode) && (flags & (DIRTREE_RECURSE|DIRTREE_COMEAGAIN))) in dirtree_handle_callback() 160 if (!new->st.st_blksize && !new->st.st_mode) in dirtree_recurse() 161 new->st.st_mode = entry->d_type<<12; in dirtree_recurse()
|