Lines Matching refs:fp
120 struct file *fp; in evaluate() local
147 for (fp = bp->b_files; fp; fp = fp->f_next) in evaluate()
148 fakedata(fp, srcdst); in evaluate()
205 for (fp = bp->b_files; fp; fp = fp->f_next) in evaluate()
206 if (fp->f_flags & F_LISTED) { in evaluate()
207 errs |= eval_file(bp, fp); in evaluate()
208 fp->f_flags &= ~F_LISTED; in evaluate()
250 struct file *fp; in add_file_arg() local
330 fp = (dp == 0) ? add_file_to_base(bp, name) in add_file_arg()
335 fp->f_flags |= F_LISTED | F_SPARSE; in add_file_arg()
338 fp->f_flags |= F_LISTED; in add_file_arg()
342 dp = fp; in add_file_arg()
370 eval_file(struct base *bp, struct file *fp) in eval_file() argument
379 showflags(fileflags, fp->f_flags), fp->f_name); in eval_file()
382 name = get_name(fp); in eval_file()
397 fp->f_flags |= F_STAT_ERROR; in eval_file()
400 fp->f_flags |= F_STAT_ERROR; in eval_file()
408 note_info(fp, &statb, usingsrc ? OPT_SRC : OPT_DST); in eval_file()
415 if (opt_acls || fp->f_info[OPT_BASE].f_numacls) in eval_file()
417 &fp->f_info[usingsrc ? OPT_SRC : OPT_DST]); in eval_file()
421 fp->f_flags |= F_EVALUATE; in eval_file()
434 if (fp->f_flags & F_LISTED) in eval_file()
435 check_inum(fp, usingsrc); in eval_file()
443 if (fp->f_flags & F_SPARSE) { in eval_file()
444 push_name(fp->f_name); in eval_file()
447 for (cp = fp->f_files; cp; cp = cp->f_next) in eval_file()
457 cur_dir = fp; in eval_file()
458 nftw(get_name(fp), &walker, MAX_DEPTH, FTW_PHYS|FTW_MOUNT); in eval_file()
498 struct file *fp; in walker() local
548 fp = add_file_to_dir(dirstack[level-1], path); in walker()
549 note_info(fp, sp, which); in walker()
552 fp->f_flags |= F_EVALUATE; in walker()
558 if (fp->f_info[OPT_BASE].f_numacls || opt_acls) in walker()
560 &fp->f_info[which]); in walker()
581 fp = (level == 0) ? cur_dir : in walker()
584 note_info(fp, sp, which); in walker()
587 if (opt_acls || fp->f_info[OPT_BASE].f_numacls) in walker()
588 (void) get_acls(name, &fp->f_info[which]); in walker()
591 fp->f_flags |= F_EVALUATE; in walker()
594 dirstack[ level ] = fp; in walker()
616 for (fp = fp->f_files; fp; fp = fp->f_next) { in walker()
617 if ((fp->f_flags & F_IN_BASELINE) == 0) in walker()
619 fp->f_flags |= F_EVALUATE; in walker()
635 fp = (level == 0) ? cur_dir : in walker()
637 fp->f_flags |= F_STAT_ERROR; in walker()
661 note_info(struct file *fp, const struct stat *sp, side_t which) in note_info() argument
665 ip = &fp->f_info[ which ]; in note_info()
682 fp->f_flags |= flags[which]; in note_info()
687 which, fp->f_name, ip->f_modtime, ip->f_modns, in note_info()
749 update_info(struct file *fp, side_t which) in update_info() argument
752 do_update(&fp->f_info[ OPT_BASE ], &fp->f_info[ which ]); in update_info()
757 which, fp->f_name, fp->f_info[ which ].f_modtime, in update_info()
758 fp->f_info[ which ].f_modns); in update_info()
778 fakedata(struct file *fp, int which) in fakedata() argument
782 fp->f_flags |= (which == OPT_SRC) ? F_IN_SOURCE : F_IN_DEST; in fakedata()
785 do_update(&fp->f_info[ which ], &fp->f_info[ OPT_BASE ]); in fakedata()
786 fp->f_info[which].f_nlink = (which == OPT_SRC) ? fp->f_s_nlink : in fakedata()
787 fp->f_d_nlink; in fakedata()
788 fp->f_info[which].f_modtime = (which == OPT_SRC) ? fp->f_s_modtime : in fakedata()
789 fp->f_d_modtime; in fakedata()
791 for (lp = fp->f_files; lp; lp = lp->f_next) in fakedata()
815 check_inum(struct file *fp, int src) in check_inum() argument
823 ip = &fp->f_info[ OPT_SRC ]; in check_inum()
824 if (ip->f_ino == fp->f_s_inum && ip->f_d_maj == fp->f_s_maj) in check_inum()
828 if (fp->f_s_inum == 0 || ip->f_ino == 0) in check_inum()
832 fprintf(stdout, V_change, fp->f_name, TXT_src, in check_inum()
833 fp->f_s_maj, fp->f_s_min, fp->f_s_inum, in check_inum()
836 ip = &fp->f_info[ OPT_DST ]; in check_inum()
837 if (ip->f_ino == fp->f_d_inum && ip->f_d_maj == fp->f_d_maj) in check_inum()
841 if (fp->f_d_inum == 0 || ip->f_ino == 0) in check_inum()
845 fprintf(stdout, V_change, fp->f_name, TXT_dst, in check_inum()
846 fp->f_d_maj, fp->f_d_min, fp->f_d_inum, in check_inum()
947 FILE *fp; in add_run() local
956 fp = popen(cmd, "r"); in add_run()
957 if (fp == NULL) { in add_run()
962 while (fgets(inbuf, sizeof (inbuf), fp) != 0) { in add_run()
985 pclose(fp); in add_run()