Lines Matching refs:st_mode
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()
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()
272 if (S_ISLNK(try->st.st_mode)) fstat(fdin, &try->st); in cp_node()
273 fdout = openat(cfd, catch, O_RDWR|O_CREAT|O_TRUNC, try->st.st_mode); in cp_node()
341 if (TT.pflags & _CP_mode) fchmod(fdout, try->st.st_mode); in cp_node()
346 if (unlinkat(tfd, try->name, S_ISDIR(try->st.st_mode) ? AT_REMOVEDIR :0)) in cp_node()
369 int i, destdir = !stat(destname, &TT.top) && S_ISDIR(TT.top.st_mode); in cp_main()
435 if (exists && ((toys.optflags & FLAG_i) || !(st.st_mode & 0222))) { in cp_main()
476 try->st.st_mode = TT.i.m ? string_to_mode(TT.i.m, try->st.st_mode) : 0755; in install_node()