Lines Matching refs:fs
69 set_utimes(const char *file, struct stat *fs)
74 tv[0].tv_sec = fs->st_atime;
76 tv[1].tv_sec = fs->st_mtime;
84 TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec);
85 TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec);
115 struct stat to_stat, *fs;
126 fs = entp->fts_statp;
164 fs->st_mode & ~(S_ISUID | S_ISGID));
173 fs->st_mode & ~(S_ISUID | S_ISGID));
201 if (fs->st_size > 0) {
206 fi.size = (size_t)fs->st_size;
216 if (fs->st_size <= MMAP_MAX_SIZE) {
217 size_t fsize = (size_t)fs->st_size;
225 (void) madvise(p, (size_t)fs->st_size,
290 if (pflag && setfile(fs, to_fd))
299 && fs->st_mode & (S_ISUID | S_ISGID) && fs->st_uid == myuid) {
303 } else if (fs->st_gid == to_stat.st_gid &&
304 fchmod(to_fd, fs->st_mode & RETAINBITS & ~myumask)) {
314 if (pflag && set_utimes(to.p_path, fs)) {
381 setfile(struct stat *fs, int fd)
386 islink = S_ISLNK(fs->st_mode);
387 fs->st_mode &= S_ISUID | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO;
395 if (fd ? fchown(fd, fs->st_uid, fs->st_gid) :
396 lchown(to.p_path, fs->st_uid, fs->st_gid)) {
401 fs->st_mode &= ~(S_ISUID | S_ISGID);
404 if (fd ? fchmod(fd, fs->st_mode) : chmod(to.p_path, fs->st_mode)) {
406 if (fd ? fchmod(fd, fs->st_mode) : lchmod(to.p_path, fs->st_mode)) {
414 unsigned long fflags = fs->st_flags;
426 if (errno != EOPNOTSUPP || fs->st_flags != 0) {
433 if (fd == 0 && set_utimes(to.p_path, fs))